Releases: serviejs/servie
Releases · serviejs/servie
Avoid Direct Body Export
Changed
- Promote
servie/dist/body/{node,browser,universal}
over default path, otherwise TypeScript will try and use both the node.js and browser types which fails in node.js-only or browser-only projects
Fixed
- Corrected use of
byte-length
to drop loading entireBuffer
into browser build
Body Class
Changed
- Renamed
Response#status
toResponse#statusCode
andResponse#statusText
toResponse#statusMessage
- Moved
Body
related functionality into aBody
class, added toServie#body
- Min node.js supported release is 6.x
Removed
- Deleted
HttpError
class
Move to @serviejs
Move to @serviejs
Better `Content-Type` Check
Fixed
- Improve the existing
Content-Type
andContent-Length
header check
Avoid Overriding `Content-Type` and `Content-Length`
Fixed
- When the
Content-Length
orContent-Type
headers are already set, always avoid overriding them
Header Case Flag
Added
- Enable a flag to
object()
for keeping the original header cases
Expose `bodyBuffered`
Added
- Expose
bodyBuffered
flag on whether the body has already been set to a buffered value or a stream
Changed
- Treat the body and other values stricter with
undefined
Remove `request` from `response`
Changed
- Remove the
request
property handling fromresponse
- this is better handled in middleware and by the transport layer
Allow JSON bodies
Fixed
- Allow JSON bodies without throwing unsupported error
Changed
- Use
request
exclusively for emitting errors (avoid emitting errors onresponse
) - Emit a
response
event when creatingnew Response(request)
Optional `Response` Options
Changed
- Allow
Response
options to be skipped