hypermessage:创建符合RFC-7230的纯文本HTTP消息

时间:2024-05-20 11:36:12
【文件属性】:

文件名称:hypermessage:创建符合RFC-7230的纯文本HTTP消息

文件大小:4KB

文件格式:ZIP

更新时间:2024-05-20 11:36:12

JavaScript

超消息 制作指定的纯文本HTTP消息。 例子 var hm = require('hypermessage'); var req = { method: 'POST', body: '{ "key": "value" }', headers: { 'Content-Type': 'foo' }, endpoint: 'https://example.com/foo?bar=baz', httpVersion: '2.0' // defaults to 1.1 }; console.log(hm.build(req)); 输出 POST https://example.com/foo?bar=baz HTTP/2.0 Content-Type: foo { "key": "value" } 执照 麻省理工学院


【文件预览】:
hypermessage-master
----test.js(1KB)
----LICENSE(1KB)
----README.md(517B)
----index.js(3KB)
----package.json(410B)

网友评论