2.0.2 • Published 9 months ago

write-response v2.0.2

Weekly downloads
19
License
MIT
Repository
github
Last release
9 months ago

write-response

Send a response to a native node http(s) response object

Example Usage

json

import writeResponse from 'write-response';
writeResponse(200, { hello: 'all good here' }, response);

text

import writeResponse from 'write-response';
writeResponse(200, 'all good here', response);

with headers

import writeResponse from 'write-response';
writeResponse(200, '<strong>HELLO</strong>', { 'Content-Type': 'text/html' }, response);

License

This project is licensed under the terms of the MIT license.

2.0.2

9 months ago

2.0.1

11 months ago

2.0.0

1 year ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.0

4 years ago

1.2.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago