Struct aws_smithy_runtime_api::http::Request
source · pub struct Request<B = SdkBody> { /* private fields */ }
Expand description
An HTTP Request Type
Implementations§
source§impl<B> Request<B>
impl<B> Request<B>
sourcepub fn try_into_http02x(self) -> Result<Request<B>, HttpError>
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.
sourcepub fn try_into_http1x(self) -> Result<Request<B>, HttpError>
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.
sourcepub fn map<U>(self, f: impl Fn(B) -> U) -> Request<U>
pub fn map<U>(self, f: impl Fn(B) -> U) -> Request<U>
Update the body of this request to be a new body.
sourcepub fn into_parts(self) -> RequestParts<B>
pub fn into_parts(self) -> RequestParts<B>
Convert this request into its parts.
sourcepub fn headers_mut(&mut self) -> &mut Headers
pub fn headers_mut(&mut self) -> &mut Headers
Returns a mutable reference to the header map
sourcepub fn uri_mut(&mut self) -> &mut Uri
pub fn uri_mut(&mut self) -> &mut Uri
Returns a mutable reference the the URI of this http::Request
sourcepub fn set_uri<U>(&mut self, uri: U) -> Result<(), U::Error>where
U: TryInto<Uri>,
pub fn set_uri<U>(&mut self, uri: U) -> Result<(), U::Error>where
U: TryInto<Uri>,
Sets the URI of this request
sourcepub fn add_extension<T: Send + Sync + Clone + 'static>(&mut self, extension: T)
pub fn add_extension<T: Send + Sync + Clone + 'static>(&mut self, extension: T)
Adds an extension to the request extensions
source§impl Request<SdkBody>
impl Request<SdkBody>
Trait Implementations§
Auto Trait Implementations§
impl<B = SdkBody> !Freeze for Request<B>
impl<B = SdkBody> !RefUnwindSafe for Request<B>
impl<B> Send for Request<B>where
B: Send,
impl<B> Sync for Request<B>where
B: Sync,
impl<B> Unpin for Request<B>where
B: Unpin,
impl<B = SdkBody> !UnwindSafe for Request<B>
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Creates a shared type from an unshared type.