wood burning stoves 2.0*
The moose likes Spring and the fly likes URL string from ClientHttpResponse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "URL string from ClientHttpResponse" Watch "URL string from ClientHttpResponse" New topic

URL string from ClientHttpResponse

sri don

Joined: Aug 17, 2012
Posts: 1

I am using RestTemplate for calling webservices and calling get() and I added Errorhandler for this template.

How ever , I wanted to get the URL in the handle error method for logging and supplying this information to monitor services,

is there any way that I can get this data ie from ClientHttpResponse , at the moment I can see only this object in the handleError method.

Bill Gorder

Joined: Mar 07, 2010
Posts: 1646

Nope. I suppose if you are also coding the webservice that you are calling you can set a custom header containing the request URL on its response. You can access the response headers from ClientHttpResponse.

[How To Ask Questions][Read before you PM me]
wood burning stoves
subject: URL string from ClientHttpResponse
Similar Threads
How do i get handle to httpServletRequest in my custom login module
call by post
Catch an exception from a class which is calling a method that throws an exception
What are method calls?