Closed gtaylor1981 closed 1 year ago
Hi @gtaylor1981 thanks for the suggestion. Yea the funny thing is, there is indeed a HttpRequestSummary object that is passed to the interceptors and metrics, and is literally just sitting right there where the Response is constructed, so it seems quite logical that it should be hung on the response object as well.
This class has the method, full request string (with query params), the raw string with param tokens, and a toString()
method that returns it as a nice string suitable for logging that contains additional information about the body
This is done as of 3.14.1 / 4.0.0-RC7
Thanks again!
I'm writing a generic error handling method to pass to
ifFailure()
and I want to log the URL where the error came from.In my error handler where it says
"???"
above I would like to be able to do something likehttpResponse.getUrl()
or evenhttpResponse.getRequest().getUrl()
.Simplified, I use the error handler like
I can't see another way to do this, other than always passing the URL to the handler. As this is created dynamically I then have to break up the fluent API as I have to first create the request separately, then pass this to the error handler.