users@jersey.java.net

RE: [Jersey] Adding info to the HTTP Header

From: Camel Christophe <ccamel_at_cls.fr>
Date: Wed, 7 Jul 2010 10:56:34 +0200

Hello,

If you plan to add additional attributes to http response, this can be done very simply using the jersey response builder.

ResponseBuilder rb = xxx ;

rb.header("myheader", "myvalue");

You can obtain the response builder in several ways :

- From a response : Response.fromResponse(response.getResponse());
- From a uri info : uriInfo.getBaseUriBuilder()

...


De : Jeffrey Tremblay [mailto:jeff.tremblay_at_threepillarsoftware.com]
Envoyé : mardi 6 juillet 2010 22:20
À : users_at_jersey.dev.java.net
Objet : [Jersey] Adding info to the HTTP Header

Hello,

I'm using Jersey to provide metadata to web clients. I was wondering if it's possible to add information to http header on the way back to the client.

Can somebody point me in the right direction?

Thank you for your help.

Regards,

Jeff
Cliquez ici si ce message est indésirable (pourriel).