Struct tauri_runtime::http::Response [−][src]
pub struct Response {
pub head: ResponseParts,
pub body: Vec<u8>,
}
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)
.mimetype("text/html")
.body("hello!".as_bytes().to_vec())
.unwrap();
Fields
head: ResponseParts
body: Vec<u8>
Implementations
Returns the StatusCode
.
Returns a reference to the associated header field map.