Usage in Deno
import * as mod from "node:http2";
Partially supported, major work in progress to enable grpc-js
.
The node:http2
module provides an implementation of the HTTP/2 protocol.
It can be accessed using:
const http2 = require('node:http2');
A Http2ServerRequest
object is created by Server or SecureServer and passed as the first argument to the 'request'
event. It may be used to access a request status,headers, anddata.
This object is created internally by an HTTP server, not by the user. It ispassed as the second parameter to the 'request'
event.
Returns a ClientHttp2Session
instance.
Returns a tls.Server
instance that creates and manages Http2Session
instances.
Returns a net.Server
instance that creates and manages Http2Session
instances.
Returns an object containing the default settings for an Http2Session
instance. This method returns a new object instance every time it is calledso instances returned may be safely modified for use.
Returns a Buffer
instance containing serialized representation of the givenHTTP/2 settings as specified in the HTTP/2 specification. This is intendedfor use with the HTTP2-Settings
header field.
Returns a HTTP/2 Settings Object
containing the deserialized settings fromthe given Buffer
as generated by http2.getPackedSettings()
.
This symbol can be set as a property on the HTTP/2 headers object withan array value in order to provide a list of headers considered sensitive.