Index - Node documentation

Usage

import * as mod from "node:http2";

The node:http2 module provides an implementation of the HTTP/2 protocol. It can be accessed using:

const http2 = require('node:http2');

Classes

c
Http2ServerRequest

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, and data.

c
Http2ServerResponse

This object is created internally by an HTTP server, not by the user. It is passed as the second parameter to the 'request' event.

Functions

f
connect

Returns a ClientHttp2Session instance.

f
createSecureServer

Returns a tls.Server instance that creates and manages Http2Sessioninstances.

f
createServer

Returns a net.Server instance that creates and manages Http2Sessioninstances.

f
getDefaultSettings

Returns an object containing the default settings for an Http2Sessioninstance. This method returns a new object instance every time it is called so instances returned may be safely modified for use.

f
getPackedSettings

Returns a Buffer instance containing serialized representation of the given HTTP/2 settings as specified in the HTTP/2 specification. This is intended for use with the HTTP2-Settings header field.

f
getUnpackedSettings

Returns a HTTP/2 Settings Object containing the deserialized settings from the given Buffer as generated by http2.getPackedSettings().

Interfaces

I
AlternativeServiceOptions
No documentation available
I
ClientHttp2Session
No documentation available
I
ClientHttp2Stream
No documentation available
I
ClientSessionOptions
No documentation available
I
ClientSessionRequestOptions
No documentation available
I
Http2SecureServer
No documentation available
I
Http2Server
No documentation available
I
HTTP2ServerCommon
No documentation available
I
Http2Session
No documentation available
I
Http2Stream
No documentation available
I
IncomingHttpHeaders
No documentation available
I
IncomingHttpStatusHeader
No documentation available
I
OutgoingHttpHeaders
No documentation available
I
SecureClientSessionOptions
No documentation available
I
SecureServerOptions
No documentation available
I
SecureServerSessionOptions
No documentation available
I
ServerHttp2Session
No documentation available
I
ServerHttp2Stream
No documentation available
I
ServerOptions
No documentation available
I
ServerSessionOptions
No documentation available
I
ServerStreamFileResponseOptions
No documentation available
I
ServerStreamFileResponseOptionsWithError
No documentation available
I
ServerStreamResponseOptions
No documentation available
I
SessionOptions
No documentation available
I
SessionState
No documentation available
I
Settings
No documentation available
I
StatOptions
No documentation available
I
StreamPriorityOptions
No documentation available
I
StreamState
No documentation available

Namespaces

N
constants
No documentation available

Variables

v
constants.DEFAULT_SETTINGS_ENABLE_PUSH
No documentation available
v
v
constants.DEFAULT_SETTINGS_MAX_FRAME_SIZE
No documentation available
v
constants.HTTP2_HEADER_ACCEPT
No documentation available
v
constants.HTTP2_HEADER_ACCEPT_CHARSET
No documentation available
v
constants.HTTP2_HEADER_ACCEPT_ENCODING
No documentation available
v
constants.HTTP2_HEADER_ACCEPT_LANGUAGE
No documentation available
v
constants.HTTP2_HEADER_ACCEPT_RANGES
No documentation available
v
constants.HTTP2_HEADER_AGE
No documentation available
v
constants.HTTP2_HEADER_ALLOW
No documentation available
v
constants.HTTP2_HEADER_AUTHORITY
No documentation available
v
constants.HTTP2_HEADER_AUTHORIZATION
No documentation available
v
constants.HTTP2_HEADER_CACHE_CONTROL
No documentation available
v
constants.HTTP2_HEADER_CONNECTION
No documentation available
v
constants.HTTP2_HEADER_CONTENT_DISPOSITION
No documentation available
v
constants.HTTP2_HEADER_CONTENT_ENCODING
No documentation available
v
constants.HTTP2_HEADER_CONTENT_LANGUAGE
No documentation available
v
constants.HTTP2_HEADER_CONTENT_LENGTH
No documentation available
v
constants.HTTP2_HEADER_CONTENT_LOCATION
No documentation available
v
constants.HTTP2_HEADER_CONTENT_MD5
No documentation available
v
constants.HTTP2_HEADER_CONTENT_RANGE
No documentation available
v
constants.HTTP2_HEADER_CONTENT_TYPE
No documentation available
v
constants.HTTP2_HEADER_DATE
No documentation available
v
constants.HTTP2_HEADER_ETAG
No documentation available
v
constants.HTTP2_HEADER_EXPECT
No documentation available
v
constants.HTTP2_HEADER_EXPIRES
No documentation available
v
constants.HTTP2_HEADER_FROM
No documentation available
v
constants.HTTP2_HEADER_HOST
No documentation available
v
constants.HTTP2_HEADER_HTTP2_SETTINGS
No documentation available
v
constants.HTTP2_HEADER_IF_MATCH
No documentation available
v
constants.HTTP2_HEADER_IF_MODIFIED_SINCE
No documentation available
v
constants.HTTP2_HEADER_IF_NONE_MATCH
No documentation available
v
constants.HTTP2_HEADER_IF_RANGE
No documentation available
v
constants.HTTP2_HEADER_IF_UNMODIFIED_SINCE
No documentation available
v
constants.HTTP2_HEADER_KEEP_ALIVE
No documentation available
v
constants.HTTP2_HEADER_LAST_MODIFIED
No documentation available
v
constants.HTTP2_HEADER_LOCATION
No documentation available
v
constants.HTTP2_HEADER_MAX_FORWARDS
No documentation available
v
constants.HTTP2_HEADER_METHOD
No documentation available
v
constants.HTTP2_HEADER_PATH
No documentation available
v
constants.HTTP2_HEADER_PREFER
No documentation available
v
constants.HTTP2_HEADER_PROXY_AUTHENTICATE
No documentation available
v
constants.HTTP2_HEADER_PROXY_AUTHORIZATION
No documentation available
v
constants.HTTP2_HEADER_PROXY_CONNECTION
No documentation available
v
constants.HTTP2_HEADER_RANGE
No documentation available
v
constants.HTTP2_HEADER_REFERER
No documentation available
v
constants.HTTP2_HEADER_REFRESH
No documentation available
v
constants.HTTP2_HEADER_RETRY_AFTER
No documentation available
v
constants.HTTP2_HEADER_SCHEME
No documentation available
v
constants.HTTP2_HEADER_SERVER
No documentation available
v
constants.HTTP2_HEADER_STATUS
No documentation available
v
constants.HTTP2_HEADER_TE
No documentation available
v
constants.HTTP2_HEADER_TRANSFER_ENCODING
No documentation available
v
constants.HTTP2_HEADER_UPGRADE
No documentation available
v
constants.HTTP2_HEADER_USER_AGENT
No documentation available
v
constants.HTTP2_HEADER_VARY
No documentation available
v
constants.HTTP2_HEADER_VIA
No documentation available
v
constants.HTTP2_HEADER_WWW_AUTHENTICATE
No documentation available
v
constants.HTTP2_METHOD_ACL
No documentation available
v
constants.HTTP2_METHOD_BASELINE_CONTROL
No documentation available
v
constants.HTTP2_METHOD_BIND
No documentation available
v
constants.HTTP2_METHOD_CHECKIN
No documentation available
v
constants.HTTP2_METHOD_CHECKOUT
No documentation available
v
constants.HTTP2_METHOD_CONNECT
No documentation available
v
constants.HTTP2_METHOD_COPY
No documentation available
v
constants.HTTP2_METHOD_DELETE
No documentation available
v
constants.HTTP2_METHOD_GET
No documentation available
v
constants.HTTP2_METHOD_HEAD
No documentation available
v
constants.HTTP2_METHOD_LABEL
No documentation available
v
constants.HTTP2_METHOD_LOCK
No documentation available
v
constants.HTTP2_METHOD_MERGE
No documentation available
v
constants.HTTP2_METHOD_MKACTIVITY
No documentation available
v
constants.HTTP2_METHOD_MKCALENDAR
No documentation available
v
constants.HTTP2_METHOD_MKCOL
No documentation available
v
constants.HTTP2_METHOD_MKREDIRECTREF
No documentation available
v
constants.HTTP2_METHOD_MKWORKSPACE
No documentation available
v
constants.HTTP2_METHOD_MOVE
No documentation available
v
constants.HTTP2_METHOD_OPTIONS
No documentation available
v
constants.HTTP2_METHOD_ORDERPATCH
No documentation available
v
constants.HTTP2_METHOD_PATCH
No documentation available
v
constants.HTTP2_METHOD_POST
No documentation available
v
constants.HTTP2_METHOD_PRI
No documentation available
v
constants.HTTP2_METHOD_PROPFIND
No documentation available
v
constants.HTTP2_METHOD_PROPPATCH
No documentation available
v
constants.HTTP2_METHOD_PUT
No documentation available
v
constants.HTTP2_METHOD_REBIND
No documentation available
v
constants.HTTP2_METHOD_REPORT
No documentation available
v
constants.HTTP2_METHOD_TRACE
No documentation available
v
constants.HTTP2_METHOD_UNBIND
No documentation available
v
constants.HTTP2_METHOD_UNCHECKOUT
No documentation available
v
constants.HTTP2_METHOD_UNLOCK
No documentation available
v
constants.HTTP2_METHOD_UPDATE
No documentation available
v
constants.HTTP2_METHOD_UPDATEREDIRECTREF
No documentation available
v
constants.HTTP2_METHOD_VERSION_CONTROL
No documentation available
v
constants.HTTP_STATUS_ACCEPTED
No documentation available
v
constants.HTTP_STATUS_ALREADY_REPORTED
No documentation available
v
constants.HTTP_STATUS_BAD_GATEWAY
No documentation available
v
constants.HTTP_STATUS_BAD_REQUEST
No documentation available
v
constants.HTTP_STATUS_CONFLICT
No documentation available
v
constants.HTTP_STATUS_CONTINUE
No documentation available
v
constants.HTTP_STATUS_CREATED
No documentation available
v
constants.HTTP_STATUS_EXPECTATION_FAILED
No documentation available
v
constants.HTTP_STATUS_FAILED_DEPENDENCY
No documentation available
v
constants.HTTP_STATUS_FORBIDDEN
No documentation available
v
constants.HTTP_STATUS_FOUND
No documentation available
v
constants.HTTP_STATUS_GATEWAY_TIMEOUT
No documentation available
v
constants.HTTP_STATUS_GONE
No documentation available
v
constants.HTTP_STATUS_IM_USED
No documentation available
v
constants.HTTP_STATUS_INSUFFICIENT_STORAGE
No documentation available
v
constants.HTTP_STATUS_INTERNAL_SERVER_ERROR
No documentation available
v
constants.HTTP_STATUS_LENGTH_REQUIRED
No documentation available
v
constants.HTTP_STATUS_LOCKED
No documentation available
v
constants.HTTP_STATUS_LOOP_DETECTED
No documentation available
v
constants.HTTP_STATUS_METHOD_NOT_ALLOWED
No documentation available
v
constants.HTTP_STATUS_MISDIRECTED_REQUEST
No documentation available
v
constants.HTTP_STATUS_MOVED_PERMANENTLY
No documentation available
v
constants.HTTP_STATUS_MULTI_STATUS
No documentation available
v
constants.HTTP_STATUS_MULTIPLE_CHOICES
No documentation available
v
constants.HTTP_STATUS_NO_CONTENT
No documentation available
v
constants.HTTP_STATUS_NOT_ACCEPTABLE
No documentation available
v
constants.HTTP_STATUS_NOT_EXTENDED
No documentation available
v
constants.HTTP_STATUS_NOT_FOUND
No documentation available
v
constants.HTTP_STATUS_NOT_IMPLEMENTED
No documentation available
v
constants.HTTP_STATUS_NOT_MODIFIED
No documentation available
v
constants.HTTP_STATUS_OK
No documentation available
v
constants.HTTP_STATUS_PARTIAL_CONTENT
No documentation available
v
constants.HTTP_STATUS_PAYLOAD_TOO_LARGE
No documentation available
v
constants.HTTP_STATUS_PAYMENT_REQUIRED
No documentation available
v
constants.HTTP_STATUS_PERMANENT_REDIRECT
No documentation available
v
constants.HTTP_STATUS_PRECONDITION_FAILED
No documentation available
v
constants.HTTP_STATUS_PRECONDITION_REQUIRED
No documentation available
v
constants.HTTP_STATUS_PROCESSING
No documentation available
v
constants.HTTP_STATUS_RANGE_NOT_SATISFIABLE
No documentation available
v
constants.HTTP_STATUS_REQUEST_TIMEOUT
No documentation available
v
constants.HTTP_STATUS_RESET_CONTENT
No documentation available
v
constants.HTTP_STATUS_SEE_OTHER
No documentation available
v
constants.HTTP_STATUS_SERVICE_UNAVAILABLE
No documentation available
v
constants.HTTP_STATUS_SWITCHING_PROTOCOLS
No documentation available
v
constants.HTTP_STATUS_TEAPOT
No documentation available
v
constants.HTTP_STATUS_TEMPORARY_REDIRECT
No documentation available
v
constants.HTTP_STATUS_TOO_MANY_REQUESTS
No documentation available
v
constants.HTTP_STATUS_UNAUTHORIZED
No documentation available
v
constants.HTTP_STATUS_UNORDERED_COLLECTION
No documentation available
v
constants.HTTP_STATUS_UNPROCESSABLE_ENTITY
No documentation available
v
v
constants.HTTP_STATUS_UPGRADE_REQUIRED
No documentation available
v
constants.HTTP_STATUS_URI_TOO_LONG
No documentation available
v
constants.HTTP_STATUS_USE_PROXY
No documentation available
v
v
constants.MAX_INITIAL_WINDOW_SIZE
No documentation available
v
constants.MAX_MAX_FRAME_SIZE
No documentation available
v
constants.MIN_MAX_FRAME_SIZE
No documentation available
v
constants.NGHTTP2_CANCEL
No documentation available
v
constants.NGHTTP2_COMPRESSION_ERROR
No documentation available
v
constants.NGHTTP2_CONNECT_ERROR
No documentation available
v
constants.NGHTTP2_DEFAULT_WEIGHT
No documentation available
v
constants.NGHTTP2_ENHANCE_YOUR_CALM
No documentation available
v
constants.NGHTTP2_ERR_FRAME_SIZE_ERROR
No documentation available
v
constants.NGHTTP2_FLAG_ACK
No documentation available
v
constants.NGHTTP2_FLAG_END_HEADERS
No documentation available
v
constants.NGHTTP2_FLAG_END_STREAM
No documentation available
v
constants.NGHTTP2_FLAG_NONE
No documentation available
v
constants.NGHTTP2_FLAG_PADDED
No documentation available
v
constants.NGHTTP2_FLAG_PRIORITY
No documentation available
v
constants.NGHTTP2_FLOW_CONTROL_ERROR
No documentation available
v
constants.NGHTTP2_FRAME_SIZE_ERROR
No documentation available
v
constants.NGHTTP2_HTTP_1_1_REQUIRED
No documentation available
v
constants.NGHTTP2_INADEQUATE_SECURITY
No documentation available
v
constants.NGHTTP2_INTERNAL_ERROR
No documentation available
v
constants.NGHTTP2_NO_ERROR
No documentation available
v
constants.NGHTTP2_PROTOCOL_ERROR
No documentation available
v
constants.NGHTTP2_REFUSED_STREAM
No documentation available
v
constants.NGHTTP2_SESSION_CLIENT
No documentation available
v
constants.NGHTTP2_SESSION_SERVER
No documentation available
v
constants.NGHTTP2_SETTINGS_ENABLE_PUSH
No documentation available
v
v
constants.NGHTTP2_SETTINGS_MAX_FRAME_SIZE
No documentation available
v
constants.NGHTTP2_SETTINGS_TIMEOUT
No documentation available
v
constants.NGHTTP2_STREAM_CLOSED
No documentation available
v
constants.NGHTTP2_STREAM_STATE_CLOSED
No documentation available
v
constants.NGHTTP2_STREAM_STATE_IDLE
No documentation available
v
constants.NGHTTP2_STREAM_STATE_OPEN
No documentation available
v
v
constants.PADDING_STRATEGY_CALLBACK
No documentation available
v
constants.PADDING_STRATEGY_MAX
No documentation available
v
constants.PADDING_STRATEGY_NONE
No documentation available
v
sensitiveHeaders

This symbol can be set as a property on the HTTP/2 headers object with an array value in order to provide a list of headers considered sensitive.