Struct hyper::Request [] [src]

pub struct Request<B = Body> { /* fields omitted */ }

An HTTP Request

Methods

impl<B> Request<B>
[src]

Construct a new Request.

Read the Request Uri.

Read the Request Version.

Read the Request headers.

Read the Request method.

Read the Request body.

The remote socket address of this request

This is an Option, because some underlying transports may not have a socket address, such as Unix Sockets.

This field is not used for outgoing requests.

The target path of this Request.

The query string of this Request.

Set the Method of this request.

Get a mutable reference to the Request headers.

Set the Uri of this request.

Set the HttpVersion of this request.

Set the body of the request.

By default, the body will be sent using Transfer-Encoding: chunked. To override this behavior, manually set a [ContentLength] header with the length of body.

Set that the URI should use the absolute form.

This is only needed when talking to HTTP/1 proxies to URLs not protected by TLS.

impl Request<Body>
[src]

Deconstruct this Request into its pieces.

Modifying these pieces will have no effect on how hyper behaves.

Take the Request body.

Trait Implementations

impl<B> Debug for Request<B>
[src]

Formats the value using the given formatter.

impl From<Message<__ProtoRequest, Body<Chunk, Error>>> for Request
[src]

Performs the conversion.