Struct salvo_core::http::response::Response [−][src]
pub struct Response { /* fields omitted */ }
Expand description
Represents an HTTP response
Implementations
Create a request from an hyper::Request.
This constructor consumes the hyper::Request.
pub fn streaming<S, O, E>(&mut self, stream: S) where
S: Stream<Item = Result<O, E>> + Send + 'static,
O: Into<Bytes> + 'static,
E: Into<Box<dyn StdError + Send + Sync>> + 'static,
Salvo executes before handler and path handler in sequence, when the response is in a committed state, subsequent handlers will not be executed, and then all after handlers will be executed.
This is a sign that the http request is completed, which can be used to process early return verification logic, such as permission verification, etc.