volga

Macro stream

Source
macro_rules! stream {
    ($body:expr) => { ... };
    ($body:expr, [ $( ($key:expr, $value:expr) ),* $(,)? ]) => { ... };
}
Expand description

Produces OK 200 response with stream body

§Examples

§Default usage

 use volga::{HttpRequest, stream};

 let boxed_body = request.into_boxed_body();
 stream!(boxed_body);

§Custom headers

 use volga::{HttpRequest, stream};

 let boxed_body = request.into_boxed_body();
 stream!(boxed_body, [
    ("Content-Type", "message/http")
 ]);