unstale

npm / got

got

What changed in got 7 to 16, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

119 breaking2 security43 new APIs and options2 performance38 behavior and defaults1 tooling99 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

got 1666 changes

Breaking changes 22

  • Default body, json, and form payloads are no longer sent with every request; payloads are never merged with defaults.

    16.1.0release notes

  • A handlers entry that is not a function now throws an error.

    16.1.0release notes

  • A HEAD request remains HEAD after a 301, 302, or 303 redirect instead of becoming GET.

    16.1.0release notes

  • Negative or fractional values now throw an error.

    16.1.0release notes

  • An empty method now throws an error instead of being accepted.

    16.1.0release notes

  • A prefix URL containing a query string or fragment now throws an error.

    16.1.0release notes

  • The promise response event now fires only for the final response, not for each retry attempt.

    16.1.0release notes

  • Response bodies no longer retain a leading UTF-8 byte order mark.

    16.1.0release notes

  • Negative or fractional retry limits now throw an error.

    16.1.0release notes

  • Hop-by-hop headers are no longer copied to a piped ServerResponse.

    16.1.0release notes

  • agent.http2 is now an opt-out flag; set it to false to skip session pooling. Passing an agent instance throws.

    16.0.0release notes

  • The deprecated auth option stub was removed; passing it now throws Unexpected option.

    16.0.0release notes

  • Piped headers no longer copy credentials, including authorization, cookie, cookie2, set-cookie, and set-cookie2; pass credentials explicitly when the upstream is trusted.

    16.0.0release notes

  • When a hook, retry, or pagination step changes origin, Got strips credentials and clears an unchanged body; set headers or body explicitly to retain them.

    16.0.0release notes

  • The deprecated followRedirects option stub was removed; passing it now throws Unexpected option.

    16.0.0release notes

  • HTTP/2 proxy support is no longer provided by Got; the notes say to keep using http2-wrapper through the request option if needed.

    16.0.0release notes

  • Got now has a built-in HTTP/2 client with session pooling and multiplexing, and no longer relies on http2-wrapper.

    16.0.0release notes

  • The OptionsOfUnknownResponseBody type was removed; it was an alias for StrictOptions.

    16.0.0release notes

  • Use response.statusCode for the status because HTTP/2 response headers no longer contain pseudo-headers.

    16.0.0release notes

  • A server response with Retry-After: 0 now retries immediately instead of using the backoff delay.

    16.0.0release notes

  • The deprecated searchParameters option stub was removed; passing it now throws Unexpected option.

    16.0.0release notes

  • timeout.socket now applies during HTTP/2 TLS negotiation and session setup, reports a socket timeout, and no longer counts DNS lookup time.

    16.0.0release notes

New APIs and options 5

  • The DnsCacheLookup type is now exported.

    16.1.0release notes

  • The DnsCacheOptions type is now exported.

    16.1.0release notes

  • The Timings type is now exported.

    16.1.0release notes

  • Adds got.query() for the QUERY method, which is safe and idempotent, retried by default, and keeps replayable bodies across redirects; the built-in cache does not store QUERY responses.

    16.0.0release notes

  • Adds got.stream.query() for the QUERY method, which is safe and idempotent, retried by default, and keeps replayable bodies across redirects; the built-in cache does not store QUERY responses.

    16.0.0release notes

Behavior and default changes 10

  • The .json() API now supports Standard Schema.

    16.2.0release notes

  • The followRedirect option is evaluated once per response.

    16.1.0release notes

  • Headers now accept number values.

    16.1.0release notes

  • Extending an instance now inherits the parent's mutableDefaults setting, like got.extend(instance).

    16.1.0release notes

  • Stacked content codings are now supported.

    16.1.0release notes

  • The x-gzip content coding is now supported.

    16.1.0release notes

  • With http2: true, a custom HTTPS agent makes Got use the native HTTP/1.1 path because the built-in session pool does not support custom HTTPS agents.

    16.0.0release notes

  • dnsCache: true uses Got's built-in cache; the option also accepts objects with lookup and optional clear functions. The cache resolves A and AAAA records separately and cannot preserve OS-specific verbatim ordering.

    16.0.0release notes

  • URL credentials are preserved when prefixUrl changes to a same-origin value, and credentials in prefixUrl are treated as explicit.

    16.0.0release notes

  • If options.request returns a request or response, it controls the transport and bypasses Got's HTTP/2 client; return undefined to use Got's transport.

    16.0.0release notes

Fixes and other changes 29

  • Hook edge cases are fixed.

    16.1.0release notes

  • Streams configured with a body, json, or form option now reject writes, matching documented behavior.

    16.1.0release notes

  • Content-Length remains correct when a hook replaces the body during a redirect.

    16.1.0release notes

  • Cookie edge cases with retries, redirects, and async cookie jars are fixed.

    16.1.0release notes

  • Upload handling now respects DataView byte ranges.

    16.1.0release notes

  • Diagnostics channel coverage now includes retries and terminal errors.

    16.1.0release notes

  • Custom DNS cache lookups and DNS records without a valid TTL are fixed.

    16.1.0release notes

  • FormData request bodies are retried by re-serializing them instead of failing.

    16.1.0release notes

  • HTTP/2 edge cases are fixed, including requests that could hang forever when a response or request was destroyed.

    16.1.0release notes

  • Infinity timeouts no longer fire immediately or throw.

    16.1.0release notes

  • JSON containing a byte order mark now parses.

    16.1.0release notes

  • Default pagination now handles real-world Link headers, with pagination option and limit edge cases also fixed.

    16.1.0release notes

  • Redirects now keep the URL fragment.

    16.1.0release notes

  • Retries with replaced or non-replayable bodies are fixed.

    16.1.0release notes

  • Error stacks now report the real error class instead of RequestError; other error cause edge cases are fixed.

    16.1.0release notes

  • Response body decoding and parsing edge cases are fixed.

    16.1.0release notes

  • Retry delay edge cases are fixed, including invalid Retry-After values and calculateDelay for afterResponse retries.

    16.1.0release notes

  • Stream handling now respects backpressure.

    16.1.0release notes

  • The request timeout no longer restarts on each redirect; timeout phase edge cases are also fixed.

    16.1.0release notes

  • TypeScript types now match runtime values.

    16.1.0release notes

  • Streams stop forwarding after unpipe.

    16.1.0release notes

  • Upload progress total is fixed for Content-Length: 0.

    16.1.0release notes

  • Web ReadableStream request bodies can now be cancelled correctly.

    16.1.0release notes

  • allowGetBody now works over HTTP/2.

    16.0.0release notes

  • Got waits for asynchronous cookie jar writes on terminal redirect responses, including when followRedirect is false.

    16.0.0release notes

  • When a cookie jar write throws, error.response.body is complete, decompressed, and decoded with the configured encoding; decoding failures no longer mask the original error.

    16.0.0release notes

  • got.stream no longer finalizes the response before the response event or before piped server response headers are set.

    16.0.0release notes

  • Connection errors reported by request.end() are retried instead of failing the request.

    16.0.0release notes

  • strictContentLength no longer counts bytes from responses that were not actually decompressed.

    16.0.0release notes

got 1522 changes

Breaking changes 10

  • Got returns 300 and 304 responses as-is instead of auto-following them; handle them manually if needed.

    15.0.0release notes

  • Automatic copying of headers from piped streams is disabled by default; enable this option to restore it. Hop-by-hop headers are never copied.

    15.0.0release notes

  • Use the native Web API FormData global directly instead of form-data packages.

    15.0.0release notes

  • The undocumented named export for Got is removed; Got has always been a default export.

    15.0.0release notes

  • The isStream option is removed; use got.stream() directly.

    15.0.0release notes

  • Node.js 22 is now required to run Got.

    15.0.0release notes

  • The promise cancel API is removed; use the signal option with AbortController instead.

    15.0.0release notes

  • Buffer responses now return Uint8Array; response.rawBody and promise.buffer() also return Uint8Array, so strict Buffer type checks may need updating.

    15.0.0release notes

  • strictContentLength defaults to true, causing a ContentLengthMismatchError when Content-Length does not match the actual body size; set it to false to restore the old behavior.

    15.0.0release notes

  • The url property is no longer present on options objects passed to hooks; use response.url or request.requestUrl instead.

    15.0.0release notes

New APIs and options 2

  • Adds the allowAbsoluteUrls option.

    15.1.0release notes

  • This option defaults to true, so custom calculateDelay functions run only when retry is allowed by limit, methods, statusCodes, and errorCodes.

    15.0.0release notes

Performance 2

  • Large JSON bodies are decoded incrementally to reduce peak memory usage.

    15.0.0release notes

  • Large text bodies are decoded incrementally to reduce peak memory usage.

    15.0.0release notes

Behavior and default changes 1

  • For json and form request bodies, uploadProgress now emits granular per-chunk events.

    15.0.0release notes

Fixes and other changes 7

  • Request bodies are now preserved on cross-origin 307 and 308 redirects.

    15.0.7release notes

  • Fixes the setter dropping the value when a URL is set.

    15.0.6release notes

  • Fixes handling of abort signals added by handlers.

    15.0.5release notes

  • Fixed aborting during download progress.

    15.0.4release notes

  • Fixes a false ReadError on responses without Content-Length.

    15.0.3release notes

  • Fixes a completion race involving the stream cookie jar.

    15.0.2release notes

  • The init types were fixed.

    15.0.1release notes

got 1429 changes

Breaking changes 2

  • Shortcut methods no longer ignore handler errors.

    14.6.0release notes

  • Node.js 20 is now required; users who need to support Node.js 18 are advised to stay on Got v13.

    14.0.0release notes

Security 1

  • Different UNIX socket paths are now treated as different origins.

    14.6.0release notes

New APIs and options 3

  • Adds retryCount to the beforeRequest hook context.

    14.6.0release notes

  • Typed arrays are now supported as request bodies.

    14.6.0release notes

  • Adds support for zstd (Zstandard) compression.

    14.6.0release notes

Behavior and default changes 4

  • The beforeError hook now allows custom Error classes.

    14.6.0release notes

  • HTTPError messages now include the method and URL.

    14.6.0release notes

  • Validation error messages now include option names.

    14.6.0release notes

  • The followRedirect option now accepts a function.

    14.0.0release notes

Fixes and other changes 19

  • Empty PATCH, DELETE, and OPTIONS streams no longer auto-end, allowing callers to pipe or write a body without a write-after-end error.

    14.6.6release notes

  • Fixes TypeScript type inference for got.extend() when using the responseType option.

    14.6.5release notes

  • Fix the dnsLookup option type so it accepts Node.js dns.lookup.

    14.6.4release notes

  • Fixes socket reuse timing and DNS timing.

    14.6.3release notes

  • Path segments containing colons are no longer misidentified as absolute URLs.

    14.6.2release notes

  • Fixes TypeScript code not being built in 14.6.0.

    14.6.1release notes

  • Fixes afterResponse hook validation to allow null body values.

    14.6.0release notes

  • The beforeError hook is now called for ERR_UNSUPPORTED_PROTOCOL errors.

    14.6.0release notes

  • Fixes a silent hang when the hook returns a cached response with a FormData body.

    14.6.0release notes

  • Fixes body reassignment in beforeRetry hooks.

    14.6.0release notes

  • Fixes incorrect content-length when piping decompressed responses.

    14.6.0release notes

  • DNS timing is now zero when connecting to IP addresses.

    14.6.0release notes

  • Hook type definitions now reflect normalized runtime state.

    14.6.0release notes

  • Fixes the issue that caused HTTP/2 timings to be NaN.

    14.6.0release notes

  • Fixes preserving prefixUrl in hooks.

    14.6.0release notes

  • EPIPE errors now follow retry logic in the Promise API.

    14.6.0release notes

  • Fixes a race condition that could cause a retry after the promise settles.

    14.6.0release notes

  • Fixes unhandled rejections caused by stream validation errors.

    14.6.0release notes

  • Fixes timings.end being undefined when a stream is destroyed before completion.

    14.6.0release notes

got 133 changes

Breaking changes 2

Behavior and default changes 1

got 1258 changes

Breaking changes 26

  • An afterResponse hook that returns an invalid value now causes an error.

    12.0.0release notes

  • The beforeRetry hook now accepts only error and retryCount; options remain accessible through error.options.

    12.0.0release notes

  • Retrying with a consumed body now throws an error.

    12.0.0release notes

  • Got no longer automatically adds content-length for a ReadStream.

    12.0.0release notes

  • The lookup option is renamed to dnsLookup.

    12.0.0release notes

  • dnsLookupIpVersion now accepts 4, 6, or undefined instead of strings such as ipv4.

    12.0.0release notes

  • error.options is now enumerable.

    12.0.0release notes

  • got.extend now throws when an option does not accept undefined; undefined no longer preserves the old value.

    12.0.0release notes

  • Init hooks run only when an options object is passed explicitly.

    12.0.0release notes

  • The methodRewriting option's behavior is inverted.

    12.0.0release notes

  • The minimum supported Node.js version is 14; Node.js 12 is no longer supported.

    12.0.0release notes

  • Got exports an Option class with setters and getters for parsing and validating options; unknown options now throw, and error.options provides options available before the error.

    12.0.0release notes

  • options.agent can no longer be false; set its http, https, and http2 properties to false instead.

    12.0.0release notes

  • The url option used when paginating must be a URL instance.

    12.0.0release notes

  • A url option supplied during pagination must be absolute; prefixUrl is reset and will not be applied.

    12.0.0release notes

  • Got is now pure ESM, so projects and tools loading it must support and be configured for ESM.

    12.0.0release notes

  • The redirect event now receives updatedOptions first and plainResponse second.

    12.0.0release notes

  • redirectUrls now contains URL instances.

    12.0.0release notes

  • request.aborted is renamed to request.isAborted.

    12.0.0release notes

  • requestUrl now returns a URL instance.

    12.0.0release notes

  • Retries must now be declared with an object, such as retry.limit, rather than as a number.

    12.0.0release notes

  • retryWithMergedOptions in an afterResponse hook now throws RetryError instead of returning a Promise, allowing beforeRetry hooks to run.

    12.0.0release notes

  • The socketPath option is removed; use the unix: protocol instead.

    12.0.0release notes

  • stackAllItems now defaults to false.

    12.0.0release notes

  • Timeouts must now be declared with an object, such as timeout.request, rather than as a number.

    12.0.0release notes

  • Legacy Url instances are no longer supported; use WHATWG URL instead.

    12.0.0release notes

New APIs and options 9

  • The AfterResponseHook TypeScript type now accepts a generic argument.

    12.0.0release notes

  • error.code is defined.

    12.0.0release notes

  • More HTTPS options are supported.

    12.0.0release notes

  • The init hook accepts a second self argument pointing to an Options instance; custom options should be placed in options.context.

    12.0.0release notes

  • A parser for the Link header is added.

    12.0.0release notes

  • A read timeout is added.

    12.0.0release notes

  • A noise retry option is added.

    12.0.0release notes

  • A retry.backoffLimit option is added.

    12.0.0release notes

  • A new error type always triggers a new retry when thrown.

    12.0.0release notes

Behavior and default changes 5

  • Async generators can now be used as a request body.

    12.0.0release notes

  • The hook's options argument is now a cloned Request options instance, allowing access to the original options.

    12.0.0release notes

  • The context option can now be merged.

    12.0.0release notes

  • defaults.handlers no longer requires a default handler.

    12.0.0release notes

  • The pagination API is improved.

    12.0.0release notes

Fixes and other changes 18

  • Got no longer throws when handling custom stack traces.

    12.0.0release notes

  • A Node.js 16 bug that could hang Got streams is fixed.

    12.0.0release notes

  • got.paginate now calls init hooks.

    12.0.0release notes

  • A promise no longer hangs on an HTTP/2 timeout.

    12.0.0release notes

  • HTTP/2 remains disabled by default but can still be enabled with the http2 option; HTTP/2 requests require Node.js 15.10 or above.

    12.0.0release notes

  • The https.alpnProtocols option now takes effect.

    12.0.0release notes

  • An invalid IP returned early by lookup no longer causes an unhandled exception.

    12.0.0release notes

  • Missing once types are added for the Stream API.

    12.0.0release notes

  • Default pagination handling is fixed for an empty Link header.

    12.0.0release notes

  • Relative URLs are handled correctly when paginating.

    12.0.0release notes

  • ParseErrors are no longer uncaught on an initially successful response.

    12.0.0release notes

  • Promise shortcuts are fixed for responses with error status codes.

    12.0.0release notes

  • Request options are now reused correctly on retry.

    12.0.0release notes

  • The Cannot call end error is fixed when request returns a Writable.

    12.0.0release notes

  • response.complete is now correct when using cache.

    12.0.0release notes

  • Merging searchParams is fixed.

    12.0.0release notes

  • The url option is now reused correctly on retry in a rare case.

    12.0.0release notes

  • Username and password are now encoded correctly in URLs.

    12.0.0release notes

got 1138 changes

Breaking changes 24

  • Got now throws when a request is aborted by the server.

    11.0.0release notes

  • The option now accepts only an object with http, https and http2 properties; http2 must be an http2wrapper.Agent instance or undefined.

    11.0.0release notes

  • The hook is now called on redirects.

    11.0.0release notes

  • The cacheAdapter option was renamed to cache; it is no longer passed to Keyv, so provide a Keyv instance to persist data.

    11.0.0release notes

  • The TypeScript type DefaultOptions was renamed to Defaults.

    11.0.0release notes

  • The option now defaults to a CacheableLookup instance and no longer accepts a Map-like instance.

    11.0.0release notes

  • The property now gives a Got stream instead of a ClientRequest instance, providing properties such as downloadProgress.

    11.0.0release notes

  • The TypeScript type GotRequestMethod was renamed to GotRequestFunction.

    11.0.0release notes

  • Errors thrown in init hooks are converted to RequestError instances, which expose Got options through error.options.

    11.0.0release notes

  • The TypeScript type Defaults was renamed to InstanceDefaults.

    11.0.0release notes

  • Got now throws on leading slashes.

    11.0.0release notes

  • Got now requires Node.js 10.19 or later.

    11.0.0release notes

  • The TypeScript type GotOptions was renamed to Options.

    11.0.0release notes

  • Encoding applies only to the Got promise API again; set stream encoding with stream.setEncoding(encoding).

    11.0.0release notes

  • The pagination option is now stable and replaces the former _pagination option.

    11.0.0release notes

  • Pagination now ignores the resolveBodyOnly option.

    11.0.0release notes

  • promise.json() now throws ParseError.

    11.0.0release notes

  • Spaces in query strings are normalized as +.

    11.0.0release notes

  • The exported error name GotError was renamed to RequestError.

    11.0.0release notes

  • The TypeScript type DefaultRetryOptions was renamed to RequiredRetryOptions.

    11.0.0release notes

  • The TypeScript type ResponseObject was renamed to Response.

    11.0.0release notes

  • Errors are no longer swallowed when using stream.pipeline(got.stream(...), ...).

    11.0.0release notes

  • Got is compatible with tough-cookie@4.0.0.

    11.0.0release notes

  • The option was removed along with support for Electron's net module; Got remains usable in Electron through electron.remote or Node.js shims.

    11.0.0release notes

Security 1

New APIs and options 1

  • HTTP2 support is available but disabled by default; enable it with http2: true.

    11.0.0release notes

Behavior and default changes 2

  • Use a beforeRequest hook to modify the request URL because options passed to init may not have a url property.

    11.0.0release notes

  • Response headers can be modified while using got.stream(...).

    11.0.0release notes

Fixes and other changes 10

  • Errors thrown in an init hook are passed to the beforeError hook.

    11.0.0release notes

  • The hook now receives options.context.

    11.0.0release notes

  • Fixes a memory leak when using the cache feature.

    10.0.0, 11.0.0release notesrelease notes

  • The cache can now be used along with the body option.

    11.0.0release notes

  • Cached responses are now decompressed.

    11.0.0release notes

  • Replacing the cache option in a Got instance now takes effect.

    11.0.0release notes

  • Passing already frozen options no longer causes Got to throw.

    11.0.0release notes

  • got.mergeOptions(...) now merges URLSearchParams instances.

    11.0.0release notes

  • Requests to UNIX sockets now include query strings.

    11.0.0release notes

  • User-provided options can now be reused.

    11.0.0release notes

got 1048 changes

Breaking changes 21

  • The baseUrl option is replaced by prefixUrl.

    10.0.0release notes

  • A canceled request with an incomplete response now throws.

    10.0.0release notes

  • Error properties previously exposed at the top level, including gotOptions and request details, are moved into error.options.

    10.0.0release notes

  • Response-related error properties, including headers, statusCode, body, and redirectUrls, are moved into error.response.

    10.0.0release notes

  • The Promise API property is renamed to isFromCache.

    10.0.0release notes

  • got.create() is removed; got.extend() can achieve the same thing.

    10.0.0release notes

  • got.mergeInstances() is removed; use an instance's extend() method instead.

    10.0.0release notes

  • Use undefined instead of null to omit a header.

    10.0.0release notes

  • Renames the Promise API property from .fromCache to .isFromCache.

    10.0.0release notes

  • Renames the stream option to isStream to clarify that it is a boolean.

    10.0.0release notes

  • The json option now accepts an object for the request body and no longer controls the response type; use .json() or responseType for JSON responses.

    10.0.0release notes

  • Got now requires Node.js 10, using Node.js 10-only APIs for more reliable stream handling.

    10.0.0release notes

  • Specifying body no longer infers the POST method; use got.post explicitly.

    10.0.0release notes

  • Replaces baseUrl with prefixUrl; when used, the url argument cannot be prefixed with a slash.

    10.0.0release notes

  • The url argument no longer accepts protocol-less URLs; provide a protocol such as https://.

    10.0.0release notes

  • The query option is replaced by searchParams.

    10.0.0release notes

  • Use responseType: 'buffer' instead of encoding: null to receive a Buffer.

    10.0.0release notes

  • Provides a callback option for calculating retry delay, replacing the callback form of retries.retry.

    10.0.0release notes

  • The retries.retry option is split; use retries.limit for the retry count.

    10.0.0release notes

  • Renames the query option to searchParams and makes it stricter.

    10.0.0release notes

  • The stream option is renamed to isStream.

    10.0.0release notes

New APIs and options 10

  • Adds Brotli support on Node.js 12 and later.

    10.0.0release notes

  • Adds an option for storing custom metadata across requests and hooks.

    10.0.0release notes

  • Allows using a cookie handler other than tough-cookie.

    10.0.0release notes

  • Adds an opt-in DNS cache.

    10.0.0release notes

  • Use responseType: 'buffer' instead of encoding: null to receive a Buffer.

    10.0.0release notes

  • Adds an option to ignore invalid cookies.

    10.0.0release notes

  • Custom instance creation and merging are simplified; extend() accepts multiple options or instances.

    10.0.0release notes

  • Adds an option to set the maximum number of redirects.

    10.0.0release notes

  • Adds an option for method rewriting on redirects.

    10.0.0release notes

  • Adds an isFromCache property to the stream API.

    10.0.0release notes

Behavior and default changes 6

  • The beforeRedirect hook now receives the response as its second argument.

    10.0.0release notes

  • The prefixUrl option can now be modified in hooks.

    10.0.0release notes

  • A failed redirect no longer retries from scratch.

    10.0.0release notes

  • The timeout option can now be modified in hooks.

    10.0.0release notes

  • URLSearchParams instances can now be merged.

    10.0.0release notes

  • The default user-agent header no longer includes the Got version.

    10.0.0release notes

Tooling 1

  • Got was rewritten in TypeScript and can provide its own type definitions.

    10.0.0release notes

Fixes and other changes 10

  • Response parsing no longer throws on 204 No Content.

    10.0.0release notes

  • Fixes response parsing when using the afterResponse hook.

    10.0.0release notes

  • Correctly handles promise- and stream-specific errors in the beforeError hook.

    10.0.0release notes

  • Retries inside afterResponse now trigger the beforeRetry hook.

    10.0.0release notes

  • Fixes cookies not being reset on redirects between different sites.

    10.0.0release notes

  • Got no longer throws on early lookups.

    10.0.0release notes

  • Fixes compatibility with Node.js 13.

    10.0.0release notes

  • Fixes a bug that could cause the Node.js process to hang.

    10.0.0release notes

  • Fixes port not being reset on redirect.

    10.0.0release notes

  • Fixes retry functionality and the default retry option value when a number is specified.

    10.0.0release notes

got 916 changes

Breaking changes 5

  • An Array is no longer supported as the body option when form: true; stringify the body yourself if needed.

    9.0.0release notes

  • The canceled property was renamed to isCanceled.

    9.0.0release notes

  • Got now requires Node.js 8, enabling use of async/await and WHATWG URL.

    9.0.0release notes

  • Calling .pipe() after the response has been emitted now throws an error, ensuring the whole response is received in flowing mode.

    9.0.0release notes

  • The retry option replaces retries and accepts a number or an object specifying retry counts, HTTP status codes, methods, and a retry decision function.

    9.0.0release notes

New APIs and options 5

  • A beforeRequest hook was added.

    9.0.0release notes

  • Creates niche-specific Got instances, such as an HTTP client for GitHub.

    9.0.0release notes

  • Creates Got instances with some options overridden.

    9.0.0release notes

  • The Promise API now emits a request event.

    9.0.0release notes

  • The Promise API now emits a response event.

    9.0.0release notes

Behavior and default changes 4

  • The body option now accepts any kind of object, not only plain objects.

    9.0.0release notes

  • Got now automatically sets the content-length header when body is a fs.createReadStream instance.

    9.0.0release notes

  • The timeout option was rewritten and can now set timeouts for individual request phases or for the whole request.

    9.0.0release notes

  • Passing null for the user-agent header removes the default user-agent header.

    9.0.0release notes

Fixes and other changes 2

  • Headers are now correctly proxied when piping got.stream().

    9.0.0release notes

  • Fixed caching when using the query option.

    9.0.0release notes

got 811 changes

Breaking changes 3

  • Passed headers with values null or undefined are excluded.

    8.0.0release notes

  • Protocol-less URLs now use HTTPS instead of defaulting to HTTP.

    8.0.0release notes

  • The useElectron option now defaults to false.

    8.0.0release notes

New APIs and options 4

Behavior and default changes 1

Fixes and other changes 3

got 713 changes

Breaking changes 4

  • An object body now requires either form or json for encoding; Got no longer defaults to URL encoding.

    7.0.0release notes

  • Got no longer throws HTTPError on 304 responses.

    7.0.0release notes

  • ParseError is now thrown only when parsing fails on 2xx responses.

    7.0.0release notes

  • Got now redirects on 307, 308, and 303 responses.

    7.0.0release notes

New APIs and options 4

Behavior and default changes 4

  • Errors now include response headers.

    7.0.0release notes

  • Redirect URLs are now included in errors and the response.

    7.0.0release notes

  • Retries are reduced in number and their delays are shorter.

    7.0.0release notes

  • The timeout option now applies to the whole request; individual request phases can also have their timeouts controlled.

    7.0.0release notes

Fixes and other changes 1