Skip to content

Commit

Permalink
HTTP error should be status code in readme.md (#303)
Browse files Browse the repository at this point in the history
HTTP `error` should be `status` code in `readme.md`
  • Loading branch information
floatdrop authored and leo committed Aug 26, 2017
1 parent 7627ffa commit 98f5f86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readme.md
Expand Up @@ -184,7 +184,7 @@ module.exports = async (req, res) => {
##### `send(res, statusCode, data = null)`

- Use `require('micro').send`.
- `statusCode` is a `Number` with the HTTP error code, and must always be supplied.
- `statusCode` is a `Number` with the HTTP status code, and must always be supplied.
- If `data` is supplied it is sent in the response. Different input types are processed appropriately, and `Content-Type` and `Content-Length` are automatically set.
- `Stream`: `data` is piped as an `octet-stream`. Note: it is _your_ responsibility to handle the `error` event in this case (usually, simply logging the error and aborting the response is enough).
- `Buffer`: `data` is written as an `octet-stream`.
Expand Down

0 comments on commit 98f5f86

Please sign in to comment.