-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Just like reading status
, statusText
and final url
i also wish there where a protocol
information on Response
object itself.
i want to know if the network call that was used when fetching some resource did decide to use http/1.1
http/2
or any other.
likewise i which i could also control what protocol should be used or sending a preferred ordered. most gRPC applications do not support http/1.1
which is the default protocol being used with fetch stuff with standard fetch api.
A gRPC service i used did support both both 1.1 and 2
But when i made a request with fetch
to that server, it responded with 426 status saying basically saying: http/1.1 is not supported, use h2 instead
if it had only supported h2 then that would have been a different story
i which i could do something like
new Request(url, {
// working similar to Content Negotiation headers
protocol: "http/2=1; http/1.1=0.5, */*;q=0.2",
// or
protocol: ['h2', 'http/1.1', '*']
})