users@jersey.java.net

[Jersey] Re: Get HTTP version from Request

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Tue, 9 Jun 2015 16:29:57 -0700

I’m afraid you will need to hook in at container level. Jersey stack is not directly involved with HTTP message parsing. That is the job of Container implementation (Servlet, Grizzly, …)

Marek

> On 02 Jun 2015, at 02:58, ismail berrada <ismaberrada_at_yahoo.fr> wrote:
>
> Hi all
>
> I have a REST web service and I want to find the HTTP version used to send the HTTP Request
> Here is an example:
>
> curl -v --http1.0 -X GET "http://IP:PORT/path/to/my/resource"
>
> The goal is to get the HTTP version aka in the previous case 1.0
>
> I create a class that implements the interface ContainerRequestFilter but I did not find the information
> I thinked about the interface MessageBodyReader but I'm not sure of that
>
> Is there a way to get the HTTP version ?
>
>
> Regards