got
16.2.0 · 30 Oct 2026MIT53.2M / weekRepositoryHomepagenpmAtom feed
188 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 5.x
5.1.0
4 Nov 2015Reading the note…
5.0.0
18 Oct 2015Reject promise on internal exception
Catch callbacks in stream mode
Reduce size for browserify
zjvxrhf
Retries
We added retries on network failures with noisy exponential backoff. By default
gotwill try five times, before returning error.Retries only applies to network errors (because network is not reliable). Requests with server errors, like
50xstatus codes, will not be retried.You can disable them by passing
0toretriesoption.Update
$ npm install --save got@5
Highlights
Reject promise on internal exception
Catch callbacks in stream mode
Reduce size for browserify
Remove
responseevent onerror(in stream mode)Catch
authoption passed inurlstringAdd retries on network errors
Deferred
responseevent
Changes
- 4.x
4.2.0
9 Sep 2015Improves error message on invalid JSON
Enable errors in stream mode
Allow requests via domain sockets
4.1.1
28 Jul 2015Fixes crashes on RequestError in Promise mode
4.1.0
27 Jul 2015Reading the note…
4.0.0
25 Jul 2015Reading the note…
- 3.x
3.3.1
15 Jul 2015Reading the note…
3.3.0
30 Jun 2015Reading the note…
3.2.0
8 May 2015Reading the note…
3.1.0
8 May 2015errorevent now have additionalbodyandresponsearguments in callback:3.0.0
6 May 2015Reading the note…
- 2.x
2.9.2
27 Apr 2015Reading the note…
2.9.1
26 Apr 20152.8.1
21 Apr 20152.8.0
21 Apr 2015Don't mutate the user-supplied options object ae73837
infinity-agent updated to
2.0.0- which uses backported Agent from Node core c06d741
2.7.2
8 Apr 2015Fixed absent nested error on parse error of response.
2.7.1
8 Apr 2015Parse response with non-2xx status code, when
jsonoption istrue.2.6.0
3 Apr 2015read-all-streamwas updated to^2.0.0- release fixes hanging requests on error in underlying streams (like ungzip) 3e55aa6
GotError: Request to .com failed at ClientRequest.<anonymous> (index.js:123:7) at ClientRequest.g (events.js:180:16) at ClientRequest.emit (events.js:95:17) at Socket.socketErrorListener (http.js:1552:9) at Socket.emit (events.js:95:17) at net.js:834:16 at process._tickCallback (node.js:442:13) Caused By: Error: getaddrinfo ENOTFOUND at errnoException (dns.js:37:11) at Object.onanswer [as oncomplete] (dns.js:124:16)Same goes for ungzip errors and response stream reading errors. All of them will be wrapped in
GotErrorwithurlin message.Highlights
read-all-streamwas updated to^2.0.0- release fixes hanging requests on error in underlying streams (like ungzip) 3e55aa6
Changes
2.5.0
24 Mar 2015Emit
responseevent with response object in Stream mode, when server response is ready. 929cb592.3.2
24 Jan 2015Prevent duplicate headers of different casing. Node will throw if it encounters that.
2.3.1
19 Jan 20152.3.0
5 Jan 20152.0.0
23 Nov 2014Return an error object on connection failure instead of the HTTP status code. 4a6b6d7
The HTTP status code is now available as acodeproperty on the error object.Read response stream even if status is not 200. cef2daa
If you only care about the returned status code make sure to do aHEADrequest.Add
timeoutoption. 14e0dd8
- 1.x
- 0.3.x
0.3.0
10 May 2014- 0.2.x
0.2.0
13 Apr 2014- 0.1.x
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.