You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wink.apache.org by Gerardo González González <ge...@gmail.com> on 2013/01/07 15:42:11 UTC

Sending response based on headers only

Hi all,

How do I send a response based on headers only?

My use case is a resource that must send a redirect. But I need to check
credentials.

Thanks.

Gerardo.

Re: Sending response based on headers only

Posted by Raymond Feng <en...@gmail.com>.
JAX-RS supports the header parameter injection. You can model your method such as:


@GET
Response myMethod(@HeaderParam("MyHeader") String header) {
}


On Jan 7, 2013, at 6:42 AM, Gerardo González González <ge...@gmail.com> wrote:

> Hi all,
> 
> How do I send a response based on headers only?
> 
> My use case is a resource that must send a redirect. But I need to check
> credentials.
> 
> Thanks.
> 
> Gerardo.