Struct hyper::client::RequestBuilder
source · pub struct RequestBuilder<'a> { /* private fields */ }
Expand description
Options for an individual Request.
One of these will be built for you if you use one of the convenience
methods, such as get()
, post()
, etc.
Implementations§
source§impl<'a> RequestBuilder<'a>
impl<'a> RequestBuilder<'a>
sourcepub fn body<B: Into<Body<'a>>>(self, body: B) -> RequestBuilder<'a>
pub fn body<B: Into<Body<'a>>>(self, body: B) -> RequestBuilder<'a>
Set a request body to be sent.
sourcepub fn headers(self, headers: Headers) -> RequestBuilder<'a>
pub fn headers(self, headers: Headers) -> RequestBuilder<'a>
Add additional headers to the request.
sourcepub fn header<H: Header + HeaderFormat>(self, header: H) -> RequestBuilder<'a>
pub fn header<H: Header + HeaderFormat>(self, header: H) -> RequestBuilder<'a>
Add an individual new header to the request.