Performs a request and reads the whole body.
A non-2xx response is returned with ok: false, never thrown — callers
decide what a 404 or a 410 means. An implementation must honour
init.signal: the reachability probe aborts after 2 s, and a transport
that ignores the signal leaves a hung request open.
Absolute URL
Optionalinit: RequestInit
Standard fetch init
The buffered response
Performs a request and leaves the body unread.
Absolute URL
Optionalinit: RequestInit
Standard fetch init
The streaming response
The HTTP surface the Consul and Kubernetes providers need.
One seam with two methods rather than two seams: both providers need both a buffered read and a streaming one. Injecting it is also the documented escape hatch for a caller-supplied TLS configuration — an in-cluster Kubernetes API server presents a CA that plain
fetchrejects.Since
0.2.0