pub struct HttpResponse {
pub status: u16,
pub body: Vec<u8>,
}Expand description
The response from HttpClient::get: the HTTP status and the raw body.
A non-2xx status is not an error here — the caller decides. Reach for this to fetch small JSON documents (OIDC discovery metadata, a JWK set).
Fields§
§status: u16The HTTP status code.
body: Vec<u8>The raw response body.
Implementations§
Source§impl HttpResponse
impl HttpResponse
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Whether the status is in the 2xx range.
Auto Trait Implementations§
impl Freeze for HttpResponse
impl RefUnwindSafe for HttpResponse
impl Send for HttpResponse
impl Sync for HttpResponse
impl Unpin for HttpResponse
impl UnsafeUnpin for HttpResponse
impl UnwindSafe for HttpResponse
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