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 fetch rejects.
request(url: string,init?: RequestInit): Promise<DiscoveryHttpResponse>
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.
stream(url: string,init?: RequestInit): Promise<DiscoveryHttpStream>
Performs a request and leaves the body unread.