Function

send-async-streaming

Begins sending the request to the given backend server, and returns a pending-response that can yield the backend response or an error.

The body argument is not consumed, so that it can accept further data to send.

The backend connection is only closed once http-body.close is called. The pending-response will not yield a response until the body is finished.

This method is most useful for programs that do some sort of processing or inspection of a potentially-large client request body. Streaming allows the program to operate on small parts of the body rather than having to read it all into memory at once.

This method returns as soon as the request begins sending to the backend, and transmission of the request body and headers will continue in the background.

send-async-streaming: func(request: request, body: borrow​<body>, backend: borrow​<backend>) -> result​<pending-response, error>;