Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] http2 client - question

Ah ok makes sense. Yes that's what I was doing but just thought I need to do it for the last stream. 



----- Original Message -----
From: "Simone Bordet" <sbordet@xxxxxxxxxxx>
To: "JETTY user mailing list" <jetty-users@xxxxxxxxxxx>
Sent: Thursday, February 2, 2017 3:47:24 PM
Subject: Re: [jetty-users] http2 client - question


On Thu, Feb 2, 2017 at 3:40 PM, Tomas Remes <tremes@xxxxxxxxxx> wrote:
> Hi,
> I am experimenting with [1]. If I am not mistaken then frame.isEndStream() never happens for onHeaders event.

It may happen for any response that has no body, such as redirects, etc.

> Is it intentional? I thought I can obtain response data (as status etc.) in this moment.

You can:

HeaderFrame frame = ...;
MetaData metaData = frame.getMetaData();
if (metaData.isResponse()) {
    MetaData.Response response = (MetaData.Response)metaData;
    int status = response.getStatus();
    // etc.

> Thanks
> [1]

Simone Bordet
Developer advice, training, services and support
from the Jetty & CometD experts.
jetty-users mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top