@gm5/response
v2.1.1
Published
对Http的response进一步封装, 提供常用的API
Downloads
9
Readme
@gm5/response
@gm5/response
对Http的response进一步封装, 提供常用的API.
安装
npm install @gm5/response
使用
import Response from '@gm5/response'
import http from 'http'
http
.createServer((req, res) => {
let response = new Response(req, res)
response.type = 'html'
response.body = '<h1>hello world</h1>'
})
.listen(3000)