pub struct Response(_, _, _);
Available on crate feature
http-api
only.Expand description
The HTTP response.
Implementations
sourceimpl Response
impl Response
sourcepub fn status(&self) -> StatusCode
pub fn status(&self) -> StatusCode
Get the StatusCode
of this Response.
sourcepub async fn bytes(self) -> Result<RawResponse>
pub async fn bytes(self) -> Result<RawResponse>
Reads the response as raw bytes.
sourcepub async fn read(self) -> Result<ResponseData>
pub async fn read(self) -> Result<ResponseData>
Reads the response.
Note that the body is serialized to a Value
.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Response
impl Send for Response
impl !Sync for Response
impl Unpin for Response
impl !UnwindSafe for Response
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more