Struct azure_core::Response
source · pub struct Response { /* private fields */ }
Expand description
An HTTP Response.
Implementations§
source§impl Response
impl Response
pub fn new( status: StatusCode, headers: Headers, stream: Pin<Box<dyn Stream<Item = Result<Bytes>> + Send + Sync>> ) -> Self
sourcepub fn status(&self) -> StatusCode
pub fn status(&self) -> StatusCode
Get the status code from the response.
sourcepub fn deconstruct(self) -> (StatusCode, Headers, ResponseBody)
pub fn deconstruct(self) -> (StatusCode, Headers, ResponseBody)
Deconstruct the HTTP response into its components.
sourcepub fn into_body(self) -> ResponseBody
pub fn into_body(self) -> ResponseBody
Consume the HTTP response and return the HTTP body bytes.