Skip to content

Releases: tomas/needle

v0.9.0

16 Apr 17:50
Compare
Choose a tag to compare
  • Added .parser property to response ('xml' or 'json' depending on the parser used).
  • Added read_timeout option, disabled by default.
  • Set utf-8 charset in Content-Type header for JSON requests.
  • Added debug module as a dependency.
  • Updated documentation.

v0.8.2

11 Mar 07:31
Compare
Choose a tag to compare

v0.8.1

11 Mar 07:24
Compare
Choose a tag to compare
  • Added follow_set_referer option.
  • Fixed cookie parsing.
  • Stricter checks when checking options (you'll now get an error when passing a string to an option that expects a boolean).

v0.8.0

11 Mar 07:22
Compare
Choose a tag to compare

This version introduces a number of new things:

  • Cookie support
  • Fine tuning for following redirects (follow_keep_method, follow_if_same_host, follow_if_same_protocol, etc)
  • Much better memory handling (lower footprint)
  • Better proxy authentication (you can now pass a proxy URL with user/pass, e.g. http://user:[email protected])
  • And a bit of code refactoring.

Important changes:

  • follow: true will no longer default to 10 redirects. You now need to explicitly pass a number.
  • timeout: true will no longer default to 10000 milisecs. Same as above, a number is expected.

v0.7.0

11 Mar 07:27
Compare
Choose a tag to compare

Api changes between v0.6 and v0.7

In version 0.7 a lot of work was done on the Needle internals to make streams a first class citizen. Needle can now be used as a streams2-compatible stream and you gain a lot of performance improvements come with it.

While great care was taken not to introduce any breaking changes, there are probably a few edge cases in which Needle's behaviour has changed, specifically:

  • Needle now emits a strict streams2-compatible stream. This means that if your code relied on the Needle stream to always be in flowing mode, your code will likely need an update. For more information about this new Stream behavior, please refer to the Node.JS blog.
  • In the v0.6 release, Needle's stream didn't parse, uncompress or did anything to the body content: everything chunk of data that was emitted on the stream was the raw body. In the 0.7 release every chunk of data will be a fully processed chunk, including uncompression, character recoding and parsing (in case of XML/JSON).

If you use the regular callback interface of Needle, this will be a backwards-compatible upgrade.