users@jersey.java.net

Re: [Jersey] HowTo get HTTP Header from a POST response?

From: Markus Kolb <java-sun_at_tower-net.de>
Date: Sat, 17 May 2008 19:54:28 +0200

Bruno Luiz Pereira da Silva wrote on 2008-05-17 17:57:
> I don't know which client API you're using, but using
> commons-http-client, this is pretty easy.

Oh, yes, of course...
I use Jersey (com.sun.jersey.api.client.*) for this.
Mostly the com.sun.jersey.api.client.WebResource class.
So both sides are driven by Jersey... but I couldn't found anything to
get the HTTP Headers.
Do I have to use com.sun.jersey.api.client.ClientFilter?



[...]
> On Sat, May 17, 2008 at 12:42 PM, Markus Kolb <java-sun_at_tower-net.de
> <mailto:java-sun_at_tower-net.de>> wrote:
>
> Hello,
>
> I need some help...
> My client does a POST and in the response from WebService I've inserted
> a custom X Header with Response.ok().header(...).build()
> OK, that's fine, the header is there.
> How does the client get the custom X Header?
> I tried to get it from WebResource with the head().
> But there is only getLanguage(), getStatus(), etc. and nothing to get a
> custom header?!
> How can this be done?
>
> Many thanks
> Markus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> <mailto:users-unsubscribe_at_jersey.dev.java.net>
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
> <mailto:users-help_at_jersey.dev.java.net>
>