expath / expath-cg

Repository for the W3C EXPath Community Group.
15 stars 6 forks source link

Do we need anything to support HTTP/2? #90

Closed adamretter closed 6 years ago

adamretter commented 6 years ago

I have not yet had much time to look at HTTP/2. If there are any new options, we should IMHO consider them for inclusion in the EXPath HTTP Client 2.

At a cursory glance it seems that HTTP/2 is mostly about a more efficient transport of HTTP 1.1. In the least we would need to allow 2.0 to be specified as the http-version option. There may be further options that we might like to add to control the transport, but these could potentially come later.

We might want to make 2.0 optional? But it seems to me that there are plenty of available HTTP 2.0 Clients now - Netty, Jetty, OkHttp, Apache Commons Http Components, and Java 9's inbuilt support.

ChristianGruen commented 6 years ago

It would definitely be exciting to provide support for HTTP/2. But maybe we should postpone it to a future version of the spec?

Sorry for being fairly quiet; I’ll be more responsive again soon.

fgeorges commented 6 years ago

I am not very familiar with HTTP/2, but IMHO it is much more than a simple improvement over 1.1. It allows to send several queries and responses over the same wire, make server pushed, and much more.

I think @ChristianGruen suggestion to postpone it is quite wise :-) HTTP/1.1 is not going anywhere anyway :-)

Maybe just allowing "2.0" as a valid version value could already allow a client to send the request as HTTP/2 and already benefit from some features (those that does not require specific HTTP/2 input, besides specific headers for instance.)

adamretter commented 6 years ago

I think for the moment we can just add to the spec that 2.0 can be used as the http-version. We should also add a note, something to the effect of:

We acknowledge that HTTP/2 support is currently in its infancy. We have attempted to design for a future version of this specification to extend control for HTTP/2 via. extension points such as `$options` and further arity functions. We await feedback from the users of the HTTP Client 2.0 spec, with regards to revisions for further support of HTTP/2 features.