aws_sdk_sts::config::http

Type Alias HttpResponse

Source
pub type HttpResponse = Response;
Expand description

Type alias for the HTTP response type that the orchestrator uses.

Aliased Type§

struct HttpResponse { /* private fields */ }

Implementations

Source§

impl<B> Response<B>

Source

pub fn try_into_http02x(self) -> Result<Response<B>, HttpError>

Converts this response into an http 0.x response.

Depending on the internal storage type, this operation may be free or it may have an internal cost.

Source

pub fn try_into_http1x(self) -> Result<Response<B>, HttpError>

Converts this response into an http 1.x response.

Depending on the internal storage type, this operation may be free or it may have an internal cost.

Source

pub fn map<U>(self, f: impl Fn(B) -> U) -> Response<U>

Update the body of this response to be a new body.

Source

pub fn new(status: StatusCode, body: B) -> Response<B>

Returns a response with the given status and body

Source

pub fn status(&self) -> StatusCode

Returns the status code

Source

pub fn status_mut(&mut self) -> &mut StatusCode

Returns a mutable reference to the status code

Source

pub fn headers(&self) -> &Headers

Returns a reference to the header map

Source

pub fn headers_mut(&mut self) -> &mut Headers

Returns a mutable reference to the header map

Source

pub fn body(&self) -> &B

Returns the body associated with the request

Source

pub fn body_mut(&mut self) -> &mut B

Returns a mutable reference to the body

Source

pub fn into_body(self) -> B

Converts this response into the response body.

Source

pub fn add_extension<T>(&mut self, extension: T)
where T: Send + Sync + Clone + 'static,

Adds an extension to the response extensions

Source§

impl Response

Source

pub fn take_body(&mut self) -> SdkBody

Replaces this response’s body with SdkBody::taken()

Trait Implementations

Source§

impl<B> Debug for Response<B>
where B: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<B> RequestId for Response<B>

Source§

fn request_id(&self) -> Option<&str>

Returns the request ID, or None if the service could not be reached.
Source§

impl<B> TryFrom<Response<B>> for Response<B>

Source§

type Error = HttpError

The type returned in the event of a conversion error.
Source§

fn try_from( value: Response<B>, ) -> Result<Response<B>, <Response<B> as TryFrom<Response<B>>>::Error>

Performs the conversion.
Source§

impl<B> TryFrom<Response<B>> for Response<B>

Source§

type Error = HttpError

The type returned in the event of a conversion error.
Source§

fn try_from( value: Response<B>, ) -> Result<Response<B>, <Response<B> as TryFrom<Response<B>>>::Error>

Performs the conversion.