Affects: spring-framework:spring-webflux:5.1.9.RELEASE
Hello,
I have a use case while making webclient requests where we use parts of the clientrequest and clientresponse together to form a log. In the clientRequest, logPrefix is an accessible unique identifier that is passed from the request to the response, yet when we try to do the same for the clientResponse, the field is present but not accessible.
We've considered a workaround where we create a custom ExchangeFunction that forces the logPrefix id into the headers of the clientRequest so that it can be read in the response, but even then, DefaultClientResponse is package-protected, which makes creating the ExchangeFunction difficult.
There is also a possibility we've overlooked a solution for this, so if there's a way to easily tie together a webclient request and response, please let me know.
If not, our proposed fix is simply to expose the logPrefix like all the other clientResponse fields.
Thank you!
Affects: spring-framework:spring-webflux:5.1.9.RELEASE
Hello,
I have a use case while making webclient requests where we use parts of the clientrequest and clientresponse together to form a log. In the clientRequest, logPrefix is an accessible unique identifier that is passed from the request to the response, yet when we try to do the same for the clientResponse, the field is present but not accessible.
We've considered a workaround where we create a custom ExchangeFunction that forces the logPrefix id into the headers of the clientRequest so that it can be read in the response, but even then, DefaultClientResponse is package-protected, which makes creating the ExchangeFunction difficult.
There is also a possibility we've overlooked a solution for this, so if there's a way to easily tie together a webclient request and response, please let me know.
If not, our proposed fix is simply to expose the logPrefix like all the other clientResponse fields.
Thank you!