github sindresorhus/got v7.0.0
7.0.0

latest releases: v14.2.1, v14.2.0, v14.1.0...
6 years ago

Breaking changes

  • Changes stringifying options behavior. 51a3eaf
    Setting the body option to be an object to stringify is no longer possible without setting either the form option for URL encoding or the json option for JSON encoding. Previously, Got would use URL encoding by default, now it will throw an error. Since the json option also means Got will decode a JSON response for you, setting both options to true will encode the request as URL and decode the response as JSON.
  • Now also redirects on 307, 308, 303 responses. b45896a
  • The timeout option now applies to the whole request and we added ability to control the timeout of the individual phases. 7964f2c

Highlights

  • Added ability to cancel in-progress requests! 9ef7a5a
  • Added WHATWG URL support. f501fc2
  • Improve request retries by reducing the number of retries and making delays shorter. 14d0859
  • Only throws ParseError when parsing fails on 2xx responses. c86706b
  • No longer throws HTTPError on 304 responses. 7b12b75
  • Added protocol property to errors. 919703c
  • Added url property to errors. a287f8e
  • Includes response headers in errors, and redirect URLs in errors and the response. 8b4d06e
  • Improve use in Electron. 2130570 6fc1902

All changes

v6.7.1...v7.0.0

Don't miss a new got release

NewReleases is sending notifications on new releases.