Corps:流式 HTTP 请求正文解析器

时间:2021-06-25 11:52:57
【文件属性】:
文件名称:Corps:流式 HTTP 请求正文解析器
文件大小:4KB
文件格式:ZIP
更新时间:2021-06-25 11:52:57
LiveScript 兵团 流式 HTTP 请求正文解析器 npm install corps 用法 var body = require ( 'corps' ) ; http . createServer ( function ( req , res ) { body . auto ( req ) . map ( function ( data ) { res . end ( data . greeting + "world" ) ; } ) ; } ) . listen ( 3000 ) ; $ curl -X POST -D ' {"greeting": "salutations"} ' -H ' Content-type: application/json ' localhost:8000 salutations world $ curl -X POST -D ' greeting=wh
【文件预览】:
Corps-master
----.npmignore(5B)
----index.ls(634B)
----.travis.yml(38B)
----Makefile(183B)
----.gitignore(18B)
----readme.md(2KB)
----test.ls(2KB)
----package.json(729B)

网友评论