pub struct HttpRequestResponse {
pub status: u16,
pub ok: bool,
pub headers: HashMap<String, String>,
pub body: Value,
}Expand description
Response from an HTTP request.
Fields§
§status: u16HTTP status code.
ok: boolWhether the status is 2xx.
headers: HashMap<String, String>Filtered response headers (content-type, location, ratelimit, etc.)
body: ValueResponse body — parsed as JSON if content-type is application/json, otherwise a string.
Trait Implementations§
Source§impl Clone for HttpRequestResponse
impl Clone for HttpRequestResponse
Source§fn clone(&self) -> HttpRequestResponse
fn clone(&self) -> HttpRequestResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HttpRequestResponse
impl Debug for HttpRequestResponse
Source§impl<'de> Deserialize<'de> for HttpRequestResponse
impl<'de> Deserialize<'de> for HttpRequestResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HttpRequestResponse
impl RefUnwindSafe for HttpRequestResponse
impl Send for HttpRequestResponse
impl Sync for HttpRequestResponse
impl Unpin for HttpRequestResponse
impl UnsafeUnpin for HttpRequestResponse
impl UnwindSafe for HttpRequestResponse
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