Struct twilio_async::Request [−][src]
pub struct Request<B = Body> { /* fields omitted */ }
An HTTP Request
Methods
impl<B> Request<B>[src]
impl<B> Request<B>pub fn new(method: Method, uri: Uri) -> Request<B>[src]
pub fn new(method: Method, uri: Uri) -> Request<B>Construct a new Request.
pub fn uri(&self) -> &Uri[src]
pub fn uri(&self) -> &UriRead the Request Uri.
pub fn version(&self) -> HttpVersion[src]
pub fn version(&self) -> HttpVersionRead the Request Version.
pub fn headers(&self) -> &Headers[src]
pub fn headers(&self) -> &HeadersRead the Request headers.
pub fn method(&self) -> &Method[src]
pub fn method(&self) -> &MethodRead the Request method.
pub fn body_ref(&self) -> Option<&B>[src]
pub fn body_ref(&self) -> Option<&B>Read the Request body.
pub fn body_mut(&mut self) -> &mut Option<B>[src]
pub fn body_mut(&mut self) -> &mut Option<B>Get a mutable reference to the Request body.
pub fn path(&self) -> &str[src]
pub fn path(&self) -> &strThe target path of this Request.
pub fn query(&self) -> Option<&str>[src]
pub fn query(&self) -> Option<&str>The query string of this Request.
pub fn set_method(&mut self, method: Method)[src]
pub fn set_method(&mut self, method: Method)Set the Method of this request.
pub fn headers_mut(&mut self) -> &mut Headers[src]
pub fn headers_mut(&mut self) -> &mut HeadersGet a mutable reference to the Request headers.
pub fn set_uri(&mut self, uri: Uri)[src]
pub fn set_uri(&mut self, uri: Uri)Set the Uri of this request.
pub fn set_version(&mut self, version: HttpVersion)[src]
pub fn set_version(&mut self, version: HttpVersion)Set the HttpVersion of this request.
pub fn set_body<T>(&mut self, body: T) where
T: Into<B>, [src]
pub fn set_body<T>(&mut self, body: T) where
T: Into<B>, 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.
pub fn set_proxy(&mut self, is_proxy: bool)[src]
pub fn set_proxy(&mut self, is_proxy: bool)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]
impl Request<Body>pub fn deconstruct(self) -> (Method, Uri, HttpVersion, Headers, Body)[src]
pub fn deconstruct(self) -> (Method, Uri, HttpVersion, Headers, Body)Deconstruct this Request into its pieces.
Modifying these pieces will have no effect on how hyper behaves.
pub fn body(self) -> Body[src]
pub fn body(self) -> BodyTake the Request body.
Trait Implementations
impl<B> Debug for Request<B>[src]
impl<B> Debug for Request<B>fn fmt(&self, f: &mut Formatter) -> Result<(), Error>[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>Formats the value using the given formatter. Read more
impl From<Message<__ProtoRequest, Body<Chunk, Error>>> for Request<Body>[src]
impl From<Message<__ProtoRequest, Body<Chunk, Error>>> for Request<Body>