users@jersey.java.net

[Jersey] Re: HTTP Request Header

From: Pavel Bucek <pavel.bucek_at_oracle.com>
Date: Mon, 08 Aug 2011 15:22:58 +0200

You should be able to access outcoming/incoming headers in client
filters, see LoggingFiter [1] for example (or you can just use it, but
it dumps entity as well).

Regards,
Pavel

[1]
http://jersey.java.net/nonav/apidocs/latest/jersey/com/sun/jersey/api/client/filter/LoggingFilter.html


On 8/8/11 3:17 PM, ebrian wrote:
> I'm working on a Jersey command-line test client for a project. I can
> connect, make calls, add HTTP Basic authentication, but to verify to our
> tester I'd like to be able to print out the HTTP header to the screen
> before/during the send. We can use tools like WireShark to see the package,
> but it's easier in our environment if I can just print it to the screen and
> have no additional outside utilities running.
>
> Can this be done? At first I was using the Client/WebResource example, but
> I've been trying to re-write it using the ClientRequest class because of the
> getHeaders() method, but no luck so far.
>
> Any help or ideas? I've searched with google for awhile, but haven't had any
> success.
>
> Thanks,
> Brian
>
> --
> View this message in context: http://jersey.576304.n2.nabble.com/HTTP-Request-Header-tp6664245p6664245.html
> Sent from the Jersey mailing list archive at Nabble.com.
>