Struct iron::request::Request
[−]
[src]
pub struct Request<'a, 'b> { pub url: Url, pub remote_addr: SocketAddr, pub local_addr: SocketAddr, pub headers: Headers, pub body: Body<'a, 'b>, pub method: Method, pub extensions: TypeMap, }
The Request
given to all Middleware
.
Stores all the properties of the client's request plus
an TypeMap
for data communication between middleware.
Fields
url | The requested URL. |
remote_addr | The originating address of the request. |
local_addr | The local address of the request. |
headers | The request headers. |
body | The request body as a reader. |
method | The request method. |
extensions | Extensible storage for data passed between middleware. |
Methods
impl<'a, 'b> Request<'a, 'b>
fn from_http(req: HttpRequest<'a, 'b>, local_addr: SocketAddr, protocol: &Protocol) -> Result<Request<'a, 'b>, String>
Create a request from an HttpRequest.
This constructor consumes the HttpRequest.