Struct hyper::client::request::Request [] [src]

pub struct Request<W> {
    pub url: Url,
    pub version: HttpVersion,
    // some fields omitted
}

A client request to a remote server. The W type tracks the state of the request, Fresh vs Streaming.

Fields

The target URI for this request.

The HTTP version of this request.

Methods

impl<W> Request<W>
[src]

Read the Request headers.

Read the Request method.

Set the write timeout.

Set the read timeout.

impl Request<Fresh>
[src]

Create a new Request<Fresh> that will use the given HttpMessage for its communication with the server. This implies that the given HttpMessage instance has already been properly initialized by the caller (e.g. a TCP connection's already established).

Create a new client request.

Create a new client request with a specific underlying NetworkStream.

Consume a Fresh Request, writing the headers and method, returning a Streaming Request.

Get a mutable reference to the Request headers.

impl Request<Streaming>
[src]

Completes writing the request, and returns a response to read from.

Consumes the Request.

Trait Implementations

impl Write for Request<Streaming>
[src]

Write a buffer into this object, returning how many bytes were written. Read more

Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more

Attempts to write an entire buffer into this write. Read more

Writes a formatted string into this writer, returning any error encountered. Read more

Creates a "by reference" adaptor for this instance of Write. Read more