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])。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。