Every export of agentc:http for JavaScript components.
import { fetch } from "agentc:http"fetch, Headers, and Response are also installed as globals as the same values this library
exports, so the import is optional for those three.
fetch(url: string, init?: FetchInit): Promise<Response>Makes an HTTP request and resolves once the response head has arrived.
The URL to request. It must be a string. A URL instance is refused.
The method, headers, and body.
The response to the request.
The response to a fetch call.
Reading this property consumes the body. Reading it a second time throws.
text(): Promise<string>Reads the response body as text.
The full response body decoded as text.
json(): Promise<unknown>Reads the response body as JSON.
The parsed JSON value.
bytes(): Promise<Uint8Array>Reads the response body as bytes.
The full response body as bytes.
arrayBuffer(): Promise<Uint8Array>Reads the response body as bytes.
The full response body as a Uint8Array, not an ArrayBuffer.
The headers of a response.
get(name: string): string | nullReads a header value by name.
The header name to read.
The header value, or null when the header is absent.
has(name: string): booleanChecks whether a header is present.
The header name to check.
true when the header is present.
keys(): string[]Lists the header names.
The response header names.
entries(): string[][]Lists the headers as name and value pairs.
The response headers as name and value pairs.
[Symbol.iterator](): IterableIterator<string[]>Iterates over the headers as name and value pairs.
An iterator yielding string[] pairs.
Fields not listed here are ignored.
The fetch surface does not include Request, FormData, Blob request bodies,
AbortController, AbortSignal, or the signal, redirect, credentials, mode, and cache
fields on the init object. Guest code cannot construct a Response or Headers. Streaming request
bodies are not supported. Response bodies do stream.
© 2026 pogue.dev. All rights reserved.
CC BY 4.0Search the agentc documentation