Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jersey.api.client.WebResource - how to debug/log the request headers

I am using jersey to generate http requests and I would like to be able to see the request before it is sent (for debugging purposes).

For example:

WebResource resource = client.resource(url);
resource.header("aa", "bb");
resource.getHeaders(); // Error: how can I do it?

thanks

like image 849
Shai Ben-Yehuda Avatar asked Aug 22 '11 15:08

Shai Ben-Yehuda


1 Answers

You can use LoggingFilter, as shown here

like image 99
ivan.cikic Avatar answered Sep 18 '22 06:09

ivan.cikic