Skip to content

HttpExtension

Defined in: src/http/HttpExtension.ts:22

System-wide HTTP extension — entry point for the routing DSL and the shared HttpClient. Every ActorSystem gets one HttpClient and a factory for HTTP servers. The default server backend is Fastify; swap it per server via builder.useBackend(new BunServeBackend()).

new HttpExtension(system): HttpExtension

Defined in: src/http/HttpExtension.ts:26

ActorSystem

HttpExtension

readonly client: HttpClient

Defined in: src/http/HttpExtension.ts:24

Shared HTTP client — uses the global fetch.


singleRequest: (req) => Promise<HttpClientResponse>

Defined in: src/http/HttpExtension.ts:75

Fire-and-forget request via the shared client.

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

HttpClientRequest

Promise<HttpClientResponse>

newServerAt(host, port): ServerBuilder

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

Start building a new server scope. Call bind(routes) to start it.

string

number

ServerBuilder