Skip to content

HttpClient

Defined in: src/http/HttpClient.ts:27

Thin HTTP client around the global fetch. Returns a uniform response shape with typed helpers (text, json) so callers don’t have to deal with two Response APIs.

new HttpClient(): HttpClient

HttpClient

delete(url, init?): Promise<HttpClientResponse>

Defined in: src/http/HttpClient.ts:69

string | URL

Omit<HttpClientRequest, "method" | "url">

Promise<HttpClientResponse>


get(url, init?): Promise<HttpClientResponse>

Defined in: src/http/HttpClient.ts:60

string | URL

Omit<HttpClientRequest, "method" | "url">

Promise<HttpClientResponse>


post(url, init?): Promise<HttpClientResponse>

Defined in: src/http/HttpClient.ts:63

string | URL

Omit<HttpClientRequest, "method" | "url">

Promise<HttpClientResponse>


put(url, init?): Promise<HttpClientResponse>

Defined in: src/http/HttpClient.ts:66

string | URL

Omit<HttpClientRequest, "method" | "url">

Promise<HttpClientResponse>


singleRequest(req): Promise<HttpClientResponse>

Defined in: src/http/HttpClient.ts:29

Single request — no connection pool. fetch handles keep-alive under the hood.

HttpClientRequest

Promise<HttpClientResponse>