Struct stream_httparse::Response [−][src]
pub struct Response<'a> { /* fields omitted */ }
Expand description
Represents a single HTTP-Request
Implementations
Creates a new Response with the given Data as its inital State
Serialzes the Response and returns the Data as a tuple of form (HTTP-Head, HTTP-Body)
Returns the StatusCode of the Response
pub fn add_header<'b, K, V>(&mut self, key: K, value: V) where
'b: 'a,
K: Into<HeaderKey<'a>>,
V: Into<HeaderValue<'a>>,
[src]
pub fn add_header<'b, K, V>(&mut self, key: K, value: V) where
'b: 'a,
K: Into<HeaderKey<'a>>,
V: Into<HeaderValue<'a>>,
[src]Adds the Key-Value Pair as a new Header to the Response or replaces the old Value of the Header if it already existed on the Response
Replaces the old Body of the Response with the new given Body and updates the Content-Length Header as well with the new Length
Checks if the Response is send using
Transfer-Encoding: Chunked
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Response<'a>
impl<'a> UnwindSafe for Response<'a>