A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
URL string from ClientHttpResponse
Joined: Aug 17, 2012
Aug 17, 2012 06:52:55
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.
Joined: Mar 07, 2010
Aug 17, 2012 12:27:08
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
It is sorta covered in the
JavaRanch Style Guide
subject: URL string from ClientHttpResponse
Catch an exception from a class which is calling a method that throws an exception
What are method calls?
How do i get handle to httpServletRequest in my custom login module
call by post
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013