aws_sdk_ssooidc::config::http

Type Alias HttpRequest

Source
pub type HttpRequest = Request;
Expand description

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

Aliased Type§

struct HttpRequest { /* private fields */ }

Implementations

Source§

impl<B> Request<B>

Source

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

Converts this request into an http 0.x request.

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<Request<B>, HttpError>

Converts this request into an http 1.x request.

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) -> Request<U>

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

Source

pub fn new(body: B) -> Request<B>

Returns a GET request with no URI

Source

pub fn into_parts(self) -> RequestParts<B>

Convert this request into its parts.

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 request into the request body.

Source

pub fn method(&self) -> &str

Returns the method associated with this request

Source

pub fn uri(&self) -> &str

Returns the URI associated with this request

Source

pub fn uri_mut(&mut self) -> &mut Uri

Returns a mutable reference the the URI of this http::Request

Source

pub fn set_uri<U>(&mut self, uri: U) -> Result<(), <U as TryInto<Uri>>::Error>
where U: TryInto<Uri>,

Sets the URI of this request

Source

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

Adds an extension to the request extensions

Source§

impl Request

Source

pub fn try_clone(&self) -> Option<Request>

Attempts to clone this request

On clone, any extensions will be cleared.

If the body is cloneable, this will clone the request. Otherwise None will be returned

Source

pub fn take_body(&mut self) -> SdkBody

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

Source

pub fn empty() -> Request

Create a GET request to / with an empty body

Source

pub fn get(uri: impl AsRef<str>) -> Result<Request, HttpError>

Creates a GET request to uri with an empty body

Trait Implementations

Source§

impl<B> Debug for Request<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> TryFrom<Request<B>> for Request<B>

Source§

type Error = HttpError

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

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

Performs the conversion.
Source§

impl<B> TryFrom<Request<B>> for Request<B>

Source§

type Error = HttpError

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

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

Performs the conversion.
Source§

impl<B> TryInto<Request<B>> for Request<B>

Source§

type Error = HttpError

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

fn try_into( self, ) -> Result<Request<B>, <Request<B> as TryInto<Request<B>>>::Error>

Performs the conversion.
Source§

impl<B> TryInto<Request<B>> for Request<B>

Source§

type Error = HttpError

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

fn try_into( self, ) -> Result<Request<B>, <Request<B> as TryInto<Request<B>>>::Error>

Performs the conversion.