Usage in Deno
import * as mod from "node:http2";
The node:http2
module provides an implementation of the HTTP/2 protocol.
It can be accessed using:
import http2 from '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, and
data.
This object is created internally by an HTTP server, not by the user. It is
passed 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.
Create an HTTP/2 server session from an existing socket.
- accept
- accept-charset
- accept-encoding
- accept-language
- accept-ranges
- access-control-allow-credentials
- access-control-allow-headers
- access-control-allow-methods
- access-control-allow-origin
- access-control-expose-headers
- access-control-max-age
- access-control-request-headers
- access-control-request-method
- age
- allow
- authorization
- cache-control
- cdn-cache-control
- connection
- content-disposition
- content-encoding
- content-language
- content-length
- content-location
- content-range
- content-security-policy
- content-security-policy-report-only
- cookie
- date
- dav
- dnt
- etag
- expect
- expires
- forwarded
- from
- host
- if-match
- if-modified-since
- if-none-match
- if-range
- if-unmodified-since
- last-modified
- link
- location
- max-forwards
- origin
- prgama
- proxy-authenticate
- proxy-authorization
- public-key-pins
- public-key-pins-report-only
- range
- referer
- referrer-policy
- refresh
- retry-after
- sec-websocket-accept
- sec-websocket-extensions
- sec-websocket-key
- sec-websocket-protocol
- sec-websocket-version
- server
- set-cookie
- strict-transport-security
- te
- trailer
- transfer-encoding
- upgrade
- upgrade-insecure-requests
- user-agent
- vary
- via
- warning
- www-authenticate
- x-content-type-options
- x-dns-prefetch-control
- x-frame-options
- x-xss-protection
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.