pub struct Response {
pub url: String,
pub ok: bool,
pub status: u16,
pub status_text: String,
pub headers: Headers,
pub bytes: Vec<u8>,
}Expand description
Response from a completed HTTP request.
Fields§
§url: StringThe URL we ended up at. This can differ from the request url when we have followed redirects.
ok: boolDid we get a 2xx response code?
status: u16Status code (e.g. 404 for “File not found”).
status_text: StringStatus text (e.g. “File not found” for status code 404).
headers: HeadersThe returned headers.
bytes: Vec<u8>The raw bytes of the response body.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more