Download Latest Version v16.1.0 source code.zip (833.0 kB) Google Add to Preferred Sources
Home / v16.1.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-10-13 3.7 kB
v16.1.0 source code.tar.gz 2026-10-13 767.5 kB
v16.1.0 source code.zip 2026-10-13 833.0 kB
Totals: 3 Items   1.6 MB 0

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

  • Fix many HTTP/2 edge cases, including requests that could hang forever when the response or request was destroyed d3c549c 78bf394 6bbc7f4 602b179 687b5c8 4ea02b8 b6522f3 9348ad6 c686386 3bbc37b 91dc486 11621cd
  • Fix timeout.request restarting on each redirect, and several timeout phase edge cases 9cd2ee6 df33cdb 4e4c583 795234f 0f1263d
  • Fix redirects: keep the URL fragment, evaluate followRedirect once per response, and keep Content-Length correct when a hook replaces the body 1febf3c a2b3d90 1d64f7c 60b48af
  • Fix Infinity timeouts firing at once or throwing 724ebc2
  • Fix retry delay edge cases, including invalid Retry-After values and calculateDelay for afterResponse retries fe58b8c 0193605
  • Fix retries with replaced or non-replayable bodies ae5521f 7c1cda3 8bbc79f 1a56d36 d012d1d
  • Fix the default paginate on real-world Link headers, and several pagination option and limit edge cases bd2dee0 1e61807 602b179 f98d0e1 c8419e4 526a988 557e61f 4712e5b a4a50ad b65e533
  • Fix afterResponse, beforeRequest, and beforeCache hook edge cases 45c201c c1cf0f8 850e49b a4a50ad 863cf30 494279b
  • Fix response body decoding and parsing edge cases c36ad51 c409a84 3c6eaf1 f658d3e dbd83df
  • Fix stream edge cases: respect backpressure, stop forwarding after unpipe, and do not copy hop-by-hop headers to a piped ServerResponse 348e114 dc929bd dc56e4b c930cd9 a9a754f
  • Fix uploads: DataView byte ranges, upload error classification, progress total for Content-Length: 0, and cancelling Web ReadableStream bodies 2a66686 d1cb051 0238069 b57120c 200bc85
  • Fix option normalization, cloning, and immutable defaults 8f44d81 687eb7d 30023f7 5548b00 bec5da6 bcc0b01 9348ad6 a9a754f 7b13369 3bd0486 d272656 0e537c7 60b62a0 129d88d
  • Fix error stacks reporting RequestError instead of the real error class, and other error cause edge cases c8419e4 9d61a37 5ccac58 71f4e0e
  • Fix custom DNS cache lookups and DNS records without a valid TTL b3dc5c6 4ea02b8 d012d1d
  • Fix cookie edge cases with retries, redirects, and async cookie jars 784bbd2 d5cd5e4
  • Fix diagnostics channel coverage across retries and terminal errors cfce7b6
  • Fix TypeScript types to match the runtime values 7c833b8 c59692b 88eeb13 0c17a8b c788ac9 a4176b6

https://github.com/sindresorhus/got/compare/v16.0.0...v16.1.0

Source: README.md, updated 2026-10-13