Struct actix_http::Request [−][src]
pub struct Request<P = BoxedPayloadStream> { /* fields omitted */ }
Expand description
An HTTP request.
Implementations
Create new Request instance
Create new Request instance
Create new Request instance
Get request’s payload
Split request into request head and payload
Http message part of the request
Mutable reference to the message’s headers.
Peer socket address.
Peer address is the directly connected peer’s socket address. If a proxy is used in front of the Actix Web server, then it would be address of this proxy.
Will only return None when called in unit tests.
Returns a reference a piece of connection data set in an on-connect callback.
let opt_t = req.conn_data::<PeerCertificate>();
Returns the connection-level data/extensions container if an on-connect callback was registered, leaving an empty one in its place.
Returns the request-local data/extensions container, leaving an empty one in its place.
Trait Implementations
Performs the conversion.
type Stream = P
type Stream = P
Type of message payload stream
Message payload stream
Returns a reference to the request-local data/extensions container.
Returns a mutable reference to the request-local data/extensions container.
Read the request content type. If request did not contain a Content-Type header, an empty string is returned. Read more
Get content type encoding. Read more
Convert the request content type to a known mime type.
Check if request has chunked transfer encoding.
Returns Ready
when the service is able to process requests. Read more
impl ServiceFactory<Request<Pin<Box<dyn Stream<Item = Result<Bytes, PayloadError>> + 'static, Global>>>> for ExpectHandler
impl ServiceFactory<Request<Pin<Box<dyn Stream<Item = Result<Bytes, PayloadError>> + 'static, Global>>>> for ExpectHandler
type Service = ExpectHandler
type Service = ExpectHandler
The kind of Service
created by this factory.
Create and return a new service asynchronously.
Auto Trait Implementations
impl<P = Pin<Box<dyn Stream<Item = Result<Bytes, PayloadError>> + 'static, Global>>> !RefUnwindSafe for Request<P>
impl<P = Pin<Box<dyn Stream<Item = Result<Bytes, PayloadError>> + 'static, Global>>> !Send for Request<P>
impl<P = Pin<Box<dyn Stream<Item = Result<Bytes, PayloadError>> + 'static, Global>>> !Sync for Request<P>
impl<P = Pin<Box<dyn Stream<Item = Result<Bytes, PayloadError>> + 'static, Global>>> !UnwindSafe for Request<P>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more