aspose file tools
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 The Software Craftsman this week in the Agile 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: 1681

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]
Don't get me started about those stupid light bulbs.
subject: URL string from ClientHttpResponse