Skip to content

big three oh

Choose a tag to compare

@refractalize refractalize released this 05 May 08:44
· 96 commits to master since this release

Big changes in this release:

  • #18: returns response body by default, which is what you want 95% of the time. To get the response, use the {response: true} option. For full backwards compat you can do this:

    let httpism = require('httpism').client({response: true})
  • #17: Logs report the times for headers and body separately:

    httpism GET http://www.example.com/ => 200 (109ms, 520ms) +546ms
    
  • #19 rename httpism.api() => httpism.client()

  • #21 better support for proxy environment variables:

    • http_proxy HTTP_PROXY - for HTTP requests
    • https_proxy HTTPS_PROXY - for HTTPS requests
    • all_proxy ALL_PROXY - for HTTP or HTTPS requests
    • no_proxy NO_PROXY - an comma separated list of hostnames (and optional ports) to not proxy
  • #22 URLs can now contain parameters, such as /articles/:articleId, to use this, pass {params: {articleId: 'xx'}} option.

  • middleware is now split up so it's easier to craft your own Httpism pipelines from scratch, see the readme and index.js for an example.

  • rename httpism.send() to httpism.request()

  • support for client-side timeouts, see options

  • can now download to a stream, and wait for the entire download to finish before resolving promise. Use the {output: aStream} option, see options