A11 TypeScript API - v0.7.0
    Preparing search index...

    Class HttpSseClientWireStream

    Fetch-based client for A11's Server-Sent Events transport.

    Because it uses fetch, the transport negotiates HTTP/1.1 or HTTP/2 transparently (per the platform and ALPN): it works against an A11 native server serving SSE over either protocol, including HTTP/1.1 chunked transfer-encoding when the server's enable_http1 option is on.

    The long-lived connect response carries messages from the service as SSE events; separate POST requests carry client messages back to the assigned stream id. The class still presents the ordinary WireStream lifecycle, so sessions and actions do not need to know that each direction uses a different HTTP request.

    This is a client-only transport: call start, not accept. Wait for waitForHttpHeaders before reading response metadata. A normal shutdown still requires halfClose, drainOutgoingMessages, and eventual peer termination.

    Implements

    Index
    • Return the headers that will be, or were, sent on HTTP requests.

      Returns Readonly<Record<string, string>>

    • Return connect-response headers after they arrive, otherwise null.

      Returns Readonly<Record<string, string>> | null