http2.getPackedSettings([settings])
添加于:v8.4.0
参数
settings
<HTTP/2 Settings Object>- 返回: <Buffer>
返回一个 Buffer
实例,其中包含 HTTP/2 规范中指定的给定 HTTP/2 设置的序列化表示。这旨在与HTTP2-Settings
标头字段一起使用。
const http2 = require('node:http2');
const packed = http2.getPackedSettings({ enablePush: false });
console.log(packed.toString('base64'));
// Prints: AAIAAAAA
相关用法
- Node.js http2.getPackedSettings()用法及代码示例
- Node.js http2.getDefaultSettings()用法及代码示例
- Node.js http2.getUnpackedSettings()用法及代码示例
- Node.js http2.connect(authority[, options][, listener])用法及代码示例
- Node.js http2.bufferSize用法及代码示例
- Node.js http2.createServer()用法及代码示例
- Node.js http2.createSecureServer(options[, onRequestHandler])用法及代码示例
- Node.js http2.createServer([options][, onRequestHandler])用法及代码示例
- Node.js http2.connect()用法及代码示例
- Node.js http2.constants用法及代码示例
- Node.js http2.aborted用法及代码示例
- Node.js ServerHttp2Stream http2stream.pushStream(headers[, options], callback)用法及代码示例
- Node.js http2session.destroyed用法及代码示例
- Node.js http2session.type用法及代码示例
- Node.js http2session.ping()用法及代码示例
- Node.js http2session.connecting用法及代码示例
- Node.js ServerHttp2Stream http2stream.respond([headers[, options]])用法及代码示例
- Node.js http2stream.setTimeout()用法及代码示例
- Node.js http2session.setTimeout()用法及代码示例
- Node.js http2stream.id用法及代码示例
- Node.js http2stream.closed用法及代码示例
- Node.js http2stream.rstCode用法及代码示例
- Node.js http2session.encrypted用法及代码示例
- Node.js http2session.closed用法及代码示例
- Node.js http2stream.pushAllowed用法及代码示例
注:本文由纯净天空筛选整理自nodejs.org大神的英文原创作品 http2.getPackedSettings([settings])。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。