Struct hyper::Request
[−]
[src]
pub struct Request<B = Body> { /* fields omitted */ }
An HTTP Request
Methods
impl<B> Request<B>[src]
fn new(method: Method, uri: Uri) -> Request<B>[src]
Construct a new Request.
fn uri(&self) -> &Uri[src]
Read the Request Uri.
fn version(&self) -> HttpVersion[src]
Read the Request Version.
fn headers(&self) -> &Headers[src]
Read the Request headers.
fn method(&self) -> &Method[src]
Read the Request method.
fn body_ref(&self) -> Option<&B>[src]
Read the Request body.
fn path(&self) -> &str[src]
The target path of this Request.
fn query(&self) -> Option<&str>[src]
The query string of this Request.
fn set_method(&mut self, method: Method)[src]
Set the Method of this request.
fn headers_mut(&mut self) -> &mut Headers[src]
Get a mutable reference to the Request headers.
fn set_uri(&mut self, uri: Uri)[src]
Set the Uri of this request.
fn set_version(&mut self, version: HttpVersion)[src]
Set the HttpVersion of this request.
fn set_body<T: Into<B>>(&mut self, body: T)[src]
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.
fn set_proxy(&mut self, is_proxy: bool)[src]
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]
fn deconstruct(self) -> (Method, Uri, HttpVersion, Headers, Body)[src]
Deconstruct this Request into its pieces.
Modifying these pieces will have no effect on how hyper behaves.
fn body(self) -> Body[src]
Take the Request body.