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]

[src]

Read the Request headers.

[src]

Read the Request method.

[src]

Set the write timeout.

[src]

Set the read timeout.

impl Request<Fresh>
[src]

[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).

[src]

Create a new client request.

[src]

Create a new client request with a specific underlying NetworkStream.

[src]

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

[src]

Get a mutable reference to the Request headers.

impl Request<Streaming>
[src]

[src]

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

Consumes the Request.

Trait Implementations

impl Write for Request<Streaming>
[src]

[src]

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

[src]

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

1.0.0
[src]

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

1.0.0
[src]

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

Important traits for &'a mut R
1.0.0
[src]

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