Struct dioxus_mobile::wry::http::Response [−]
pub struct Response {
pub head: ResponseParts,
pub body: Vec<u8, Global>,
}
Expand description
Represents an HTTP response
An HTTP response consists of a head and a potentially body.
Platform-specific
- Linux: Headers and status code cannot be changed.
Examples
let response = ResponseBuilder::new()
.status(202)
.body("hello!".as_bytes().to_vec())
.unwrap();
Fields
head: ResponseParts
body: Vec<u8, Global>
Implementations
impl Response
impl Response
pub fn status(&self) -> StatusCode
pub fn status(&self) -> StatusCode
Returns the StatusCode
.
pub fn headers(&self) -> &HeaderMap<HeaderValue>
pub fn headers(&self) -> &HeaderMap<HeaderValue>
Returns a reference to the associated header field map.