Meaningless Drivel is fun!
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
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: 1682

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]
I agree. Here's the link:
subject: URL string from ClientHttpResponse
It's not a secret anymore!