@gm5/response

2.1.1 • Public • Published

downloads version

@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)

Readme

Keywords

Package Sidebar

Install

npm i @gm5/response

Weekly Downloads

2

Version

2.1.1

License

MIT

Unpacked Size

14.5 kB

Total Files

7

Last publish

Collaborators

  • yutent