light my request:伪HTTP注入库 源码

partly4230 3 0 ZIP 2021-02-07 02:02:59

点亮我的要求 将伪造的HTTP请求/响应注入到节点HTTP服务器中,以模拟服务器逻辑,编写测试或调试。 不使用套接字连接,因此可以在不活动的服务器(服务器未处于侦听模式)上运行。 例 const http = require ( 'http' ) const inject = require ( 'light-my-request' ) const dispatch = function ( req , res ) { const reply = 'Hello World' res . writeHead ( 200 , { 'Content-Type' : 'text/plain'

用户评论
请输入评论内容
评分:
暂无评论