Skip to content

Releases: serviejs/servie

Avoid Direct Body Export

10 Apr 01:16
Compare
Choose a tag to compare

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 entire Buffer into browser build

Body Class

08 Apr 00:18
Compare
Choose a tag to compare

Changed

  • Renamed Response#status to Response#statusCode and Response#statusText to Response#statusMessage
  • Moved Body related functionality into a Body class, added to Servie#body
  • Min node.js supported release is 6.x

Removed

  • Deleted HttpError class

Move to @serviejs

08 May 20:57
Compare
Choose a tag to compare

Better `Content-Type` Check

05 May 16:48
Compare
Choose a tag to compare

Fixed

  • Improve the existing Content-Type and Content-Length header check

Avoid Overriding `Content-Type` and `Content-Length`

05 May 16:32
Compare
Choose a tag to compare

Fixed

  • When the Content-Length or Content-Type headers are already set, always avoid overriding them

Header Case Flag

21 Apr 00:30
Compare
Choose a tag to compare

Added

  • Enable a flag to object() for keeping the original header cases

Expose `bodyBuffered`

15 Mar 02:41
Compare
Choose a tag to compare

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`

25 Jan 05:19
Compare
Choose a tag to compare

Changed

  • Remove the request property handling from response - this is better handled in middleware and by the transport layer

Allow JSON bodies

24 Jan 05:55
Compare
Choose a tag to compare

Fixed

  • Allow JSON bodies without throwing unsupported error

Changed

  • Use request exclusively for emitting errors (avoid emitting errors on response)
  • Emit a response event when creating new Response(request)

Optional `Response` Options

23 Jan 18:16
Compare
Choose a tag to compare

Changed

  • Allow Response options to be skipped