wasm-posix-host
    Preparing search index...

    Interface HttpRequest

    External HTTP request interface — shared types and HTTP/1.1 framing helpers.

    These let host code send an HTTP request to a server running inside the kernel ("in-kernel server") and receive a parsed response, without going through real TCP. The actual pump runs inside the kernel worker via CentralizedKernelWorker.sendHttpRequest; this file holds the data shapes and the byte-level codec that both ends share.

    Prototype scope (see docs/plans/2026-04-30-external-kernel-http-request-interface.md):

    • Request and response bodies are buffered in full (no streaming).
    • Plain HTTP/1.1 only.
    • Each call opens a fresh injected connection (no pipelining).
    interface HttpRequest {
        body: Uint8Array<ArrayBufferLike> | null;
        headers: Record<string, string>;
        method: string;
        url: string;
    }
    Index

    Properties

    Properties

    body: Uint8Array<ArrayBufferLike> | null

    Optional request body.

    headers: Record<string, string>

    Header name → value. Header names are sent verbatim. If Content-Length is missing and body is non-empty, it's added automatically. If Connection is missing, Connection: close is added so the server closes the response cleanly.

    method: string

    HTTP method, e.g. "GET", "POST".

    url: string

    Request-target — what goes after the method on the request line, e.g. /foo?x=1. Typically a path; absolute URLs work for proxy-style requests but the in-kernel server determines the routing.