Skip to content

Controlling & inform ALPN protocol #9

@jimmywarting

Description

@jimmywarting

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', '*']
}) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions