Struct wasmcloud_component::wasi::http::types::IncomingRequest
source · pub struct IncomingRequest { /* private fields */ }Expand description
Represents an incoming HTTP Request.
Implementations§
source§impl IncomingRequest
impl IncomingRequest
sourcepub fn path_with_query(&self) -> Option<String>
pub fn path_with_query(&self) -> Option<String>
Returns the path with query parameters from the request, as a string.
source§impl IncomingRequest
impl IncomingRequest
Returns the authority from the request, if it was present.
source§impl IncomingRequest
impl IncomingRequest
sourcepub fn headers(&self) -> Fields
pub fn headers(&self) -> Fields
Get the headers associated with the request.
The returned headers resource is immutable: set, append, and
delete operations will fail with header-error.immutable.
The headers returned are a child resource: it must be dropped before
the parent incoming-request is dropped. Dropping this
incoming-request before all children are dropped will trap.
source§impl IncomingRequest
impl IncomingRequest
sourcepub fn consume(&self) -> Result<IncomingBody, ()>
pub fn consume(&self) -> Result<IncomingBody, ()>
Gives the incoming-body associated with this request. Will only
return success at most once, and subsequent calls will return error.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for IncomingRequest
impl RefUnwindSafe for IncomingRequest
impl Send for IncomingRequest
impl Sync for IncomingRequest
impl Unpin for IncomingRequest
impl UnwindSafe for IncomingRequest
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