pub struct HttpResponse {
pub status: StatusCode,
pub body: ByteStream,
pub headers: HeaderMap<String>,
}
Expand description
Stores the response from a HTTP request.
Fields§
§status: StatusCode
Status code of HTTP Request
body: ByteStream
Contents of Response
headers: HeaderMap<String>
Response headers
Implementations§
Source§impl HttpResponse
impl HttpResponse
Sourcepub async fn buffer(
&mut self,
) -> Result<BufferedHttpResponse, HttpDispatchError>
pub async fn buffer( &mut self, ) -> Result<BufferedHttpResponse, HttpDispatchError>
Buffer the full response body in memory, resulting in a BufferedHttpResponse
.
Auto Trait Implementations§
impl Freeze for HttpResponse
impl !RefUnwindSafe for HttpResponse
impl Send for HttpResponse
impl Sync for HttpResponse
impl Unpin 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