A response whose body produce writes with send_chunk. data is handed to it as is.
- produce: writes the body; it runs after the head has been sent.
- data: handed to
produceuntouched. It has to outlive the response. - content_type: the
Content-Typeheader value. - status: the HTTP status code.
stream_response :: (
produce: Stream_Producer,
data: *void,
content_type: string,
status := 200
) -> Response
A response whose body produce writes with send_chunk. data is handed to it as is.
Parameters
- produce: Stream_Producer
- writes the body; it runs after the head has been sent.
- data: *void
- handed to
produceuntouched. It has to outlive the response. - content_type: string
- the
Content-Typeheader value. - status := 200
- the HTTP status code.