Search code examples
http2

HTTP/2 specific headers


Where can I find a complete guide of http2 specific headers (:method :status :path etc..)

There's nothing on MDN, I found articles what describe HTTP/2 protocol but cannot find a complete list of these headers


Solution

  • These are defined in the HTTP/2 RFC specification: https://www.rfc-editor.org/rfc/rfc7540

    And in particular on sections 8.1.2.1 which defines what they are:

    While HTTP/1.x used the message start-line (see [RFC7230], Section 3.1) to convey the target URI, the method of the request, and the status code for the response, HTTP/2 uses special pseudo-header fields beginning with ':' character (ASCII 0x3a) for this purpose.

    Pseudo-header fields are not HTTP header fields. Endpoints MUST NOT generate pseudo-header fields other than those defined in this document.

    And in Sections 8.1.2.3 and 8.1.2.4 which defines the request and response pseudo headers respectively and lists them as follows:

    Request

    • :method
    • :scheme
    • :authority
    • :path

    Response

    • :status