javascript - HTTP header 解析器

标签 javascript node.js parsing http

在node.js中,当源是缓冲区/字符串时,有哪些轻量级方法可以解析HTTP header ? 类似于使用express.js或 Node 的内部http模块,但不创建实际的网络连接。

github/开源,目前开发人员的替代方案首选“gist”类型的解决方案,谢谢

最佳答案

您可以使用 Node http module 在内部使用的内置 HTTPParser。 .

关于javascript - HTTP header 解析器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23181380/

相关文章:

javascript - 变量不保留值

git - CLI : implement something like git commit (open a text editor and get value)

java - 在 Java 中解析以下日志条目的最佳方法是什么?

node.js - Node : SerialPort is not a constructor

java - 如何在 Java 中解析这样的 URI

ruby - 解析来自 API 的字符串

javascript - Stripe JS 使 token 无效/销毁?

javascript - ThreeJS 新网格 vs 克隆

javascript - 查找距初始 GPS 点集 10 英尺的点

javascript - 为生产、开发、发布设置单独的变量值