Struct actix_web::client::ClientResponse
source · pub struct ClientResponse(_, _);
Expand description
An HTTP Client response
Implementations
sourceimpl ClientResponse
impl ClientResponse
Trait Implementations
sourceimpl Debug for ClientResponse
impl Debug for ClientResponse
sourceimpl<'a> From<&'a ClientResponse> for HttpResponseBuilder
impl<'a> From<&'a ClientResponse> for HttpResponseBuilder
Create HttpResponseBuilder
from ClientResponse
It is useful for proxy response. This implementation copies all responses’s headers and status.
sourcefn from(resp: &'a ClientResponse) -> HttpResponseBuilder
fn from(resp: &'a ClientResponse) -> HttpResponseBuilder
Converts to this type from the input type.
sourceimpl HttpMessage for ClientResponse
impl HttpMessage for ClientResponse
sourcefn content_type(&self) -> &str
fn content_type(&self) -> &str
Read the request content type. If request does not contain
Content-Type header, empty str get returned. Read more
sourcefn encoding(&self) -> Result<EncodingRef, ContentTypeError>
fn encoding(&self) -> Result<EncodingRef, ContentTypeError>
Get content type encoding Read more
sourcefn mime_type(&self) -> Result<Option<Mime>, ContentTypeError>
fn mime_type(&self) -> Result<Option<Mime>, ContentTypeError>
Convert the request content type to a known mime type.
sourcefn chunked(&self) -> Result<bool, ParseError>
fn chunked(&self) -> Result<bool, ParseError>
Check if request has chunked transfer encoding
sourcefn body(&self) -> MessageBody<Self>
fn body(&self) -> MessageBody<Self>
Load http message body. Read more
sourcefn urlencoded<T: DeserializeOwned>(&self) -> UrlEncoded<Self, T>
fn urlencoded<T: DeserializeOwned>(&self) -> UrlEncoded<Self, T>
Parse
application/x-www-form-urlencoded
encoded request’s body.
Return UrlEncoded
future. Form can be deserialized to any type that
implements Deserialize
trait from serde. Read moresourcefn json<T: DeserializeOwned>(&self) -> JsonBody<Self, T>
fn json<T: DeserializeOwned>(&self) -> JsonBody<Self, T>
Auto Trait Implementations
impl !RefUnwindSafe for ClientResponse
impl !Send for ClientResponse
impl !Sync for ClientResponse
impl Unpin for ClientResponse
impl !UnwindSafe for ClientResponse
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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