Deno.HttpConn

The async iterable that is returned from Deno.serveHttp which yields up RequestEvent events, representing individual requests on the HTTP server connection.

interface HttpConn extends AsyncIterable<RequestEvent>, Disposable {
readonly rid: number;
close(): void;
nextRequest(): Promise<RequestEvent | null>;
}

§Extends

§
AsyncIterable<RequestEvent>
[src]
§
Disposable
[src]

§Properties

§
readonly rid: number
[src]

The resource ID associated with this connection. Generally users do not need to be aware of this identifier.

§Methods

§
close(): void
[src]

Initiate a server side closure of the connection, indicating to the client that you refuse to accept any more requests on this connection.

Typically the client closes the connection, which will result in the async iterable terminating or the nextRequest() method returning null.

§
nextRequest(): Promise<RequestEvent | null>
[src]

An alternative to the async iterable interface which provides promises which resolve with either a RequestEvent when there is another request or null when the client has closed the connection.