[−][src]Struct actix_http::Request
Request
Methods
impl Request<PayloadStream>[src]
pub fn new() -> Request<PayloadStream>[src]
Create new Request instance
impl<P> Request<P>[src]
pub fn with_payload(payload: Payload<P>) -> Request<P>[src]
Create new Request instance
pub fn replace_payload<P1>(
self,
payload: Payload<P1>
) -> (Request<P1>, Payload<P>)[src]
self,
payload: Payload<P1>
) -> (Request<P1>, Payload<P>)
Create new Request instance
pub fn take_payload(&mut self) -> Payload<P>[src]
Get request's payload
pub fn into_parts(self) -> (Message<RequestHead>, Payload<P>)[src]
Split request into request head and payload
pub fn head(&self) -> &RequestHead[src]
Http message part of the request
pub fn headers_mut(&mut self) -> &mut HeaderMap[src]
Mutable reference to the message's headers.
pub fn uri(&self) -> &Uri[src]
Request's uri.
pub fn uri_mut(&mut self) -> &mut Uri[src]
Mutable reference to the request's uri.
pub fn method(&self) -> &Method[src]
Read the Request method.
pub fn version(&self) -> Version[src]
Read the Request Version.
pub fn path(&self) -> &str[src]
The target path of this Request.
pub fn upgrade(&self) -> bool[src]
Check if request requires connection upgrade
Trait Implementations
impl<P> HttpMessage for Request<P>[src]
type Stream = P
Type of message payload stream
fn headers(&self) -> &HeaderMap[src]
fn extensions(&self) -> Ref<Extensions>[src]
Request extensions
fn extensions_mut(&self) -> RefMut<Extensions>[src]
Mutable reference to a the request's extensions
fn take_payload(&mut self) -> Payload<P>[src]
fn content_type(&self) -> &str[src]
Read the request content type. If request does not contain Content-Type header, empty str get returned. Read more
fn encoding(&self) -> Result<EncodingRef, ContentTypeError>[src]
Get content type encoding Read more
fn mime_type(&self) -> Result<Option<Mime>, ContentTypeError>[src]
Convert the request content type to a known mime type.
fn chunked(&self) -> Result<bool, ParseError>[src]
Check if request has chunked transfer encoding
fn cookies(&self) -> Result<Ref<Vec<Cookie<'static>>>, CookieParseError>[src]
Load request cookies.
fn cookie(&self, name: &str) -> Option<Cookie<'static>>[src]
Return request cookie.
impl From<Message<RequestHead>> for Request<PayloadStream>[src]
fn from(head: Message<RequestHead>) -> Self[src]
impl<P> Debug for Request<P>[src]
Auto Trait Implementations
impl<P = Box<dyn Stream<Item = Bytes, Error = PayloadError> + 'static>> !Send for Request<P>
impl<P = Box<dyn Stream<Item = Bytes, Error = PayloadError> + 'static>> !Sync for Request<P>
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.