Provide the HttpRequest on the ClientResponse interface #28397
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
The ClientResponse currenly does not provide an accessor to the HttpRequest object for which it was built.
This could be useful on (ExchangeFilterFunction)(https://github.com/spring-projects/spring-framework/blob/main/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/ExchangeFilterFunction.java) when handling redirects that happen at the TcpClient level.
Take for example the following sample:
In the line "1", I print the URL being requested originally, however the URL that it was finally used could be different on "2" if a redirect was followed. At the moment, there isn't a way of accessing that information from the ClientResponse object.
The text was updated successfully, but these errors were encountered: