Packages

got

16.2.0 · 30 Oct 2026MIT53.2M / weekRepositoryHomepagenpmAtom feed

Your version

16.1.0

13 Oct 2026Where it was published

16.2.0 is the newest release of 16.x.

In short

4 new17 fixed7 changed

Release note

This release is the result of a large bug hunt. Many of the fixes make Got match its documented behavior, so you may notice some of them:

  • Invalid options now throw: an empty method, a negative or fractional maxRedirects or retry.limit, a prefixUrl with a query string or fragment, and a handlers entry that is not a function.

  • A stream with a body, json, or form option now rejects writes, as documented.

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

  • got.extend({body}) (and json, form) no longer sends the payload with every request of the instance. Payloads are never merged with defaults.

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

  • A HEAD request is no longer changed to GET on a 301, 302, or 303 redirect.

  • response.body no longer keeps a leading UTF-8 byte order mark, and JSON with a byte order mark now parses.

Improvements

  • Accept number values in headers 6fffc9e

  • Export the Timings, DnsCacheLookup, and DnsCacheOptions types d012d1d eccaaca

  • Retry FormData bodies by re-serializing them instead of failing 90c6ec1

  • Support the x-gzip content coding and stacked content codings 5550a79

Fixes


v16.0.0...v16.1.0

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.