pub fn headers(mut self, headers: crate::header::HeaderMap) -> RequestBuilder {
        if let Ok(ref mut req) = self.request {
            async_impl::request::replace_headers(req.headers_mut(), headers);
        }
        self
    }
/// Add a set of Headers to the existing ones on this Request.
///
/// The headers will be merged in to any already set.
///
/// ```rust
/// use reqwest::header::{HeaderMap, HeaderValue, USER_AGENT, CONTENT_TYPE};
/// # use std::fs;
///
/// fn construct_headers() -> HeaderMap {
///     let mut headers = HeaderMap::new();
///     headers.insert(USER_AGENT, HeaderValue::from_static("reqwest"));
///     headers.insert(CONTENT_TYPE, HeaderValue::from_static("image/png"));
///     headers
/// }
///
/// # fn run() -> Result<(), Box<std::error::Error>> {
/// let file = fs::File::open("much_beauty.png")?;
/// let client = reqwest::blocking::Client::new();
/// let res = client.post("http://httpbin.org/post")
///     .headers(construct_headers())
///     .body(file)
///     .send()?;
/// # Ok(())
/// # }
/// ```
Add a set of Headers to the existing ones on this Request.
The headers will be merged in to any already set.


Add a set of Headers to the existing ones on this Request . The headers will be merged in to any already set .
pub fn headers(mut self, headers: crate::header::HeaderMap) -> RequestBuilder {
        if let Ok(ref mut req) = self.request {
            async_impl::request::replace_headers(req.headers_mut(), headers);
        }
        self
    }
pub fn headers ( mut self , headers : crate :: header :: HeaderMap ) -> RequestBuilder { if let Ok ( ref mut req ) = self . request { async_impl :: request :: replace_headers ( req . headers_mut ( ) , headers ) ; } self }
Add a set of Headers to the existing ones on this Request.
Add a set of Headers to the existing ones on this Request .
mut self
headers
crate::header::HeaderMap
mut self
headers
crate::header::HeaderMap
use std::fs;
fn construct_headers() -> HeaderMap {
let mut headers = HeaderMap::new();
headers.insert(USER_AGENT, HeaderValue::from_static("reqwest"));
headers.insert(CONTENT_TYPE, HeaderValue::from_static("image/png"));
headers
}
fn construct_headers () - > HeaderMap { let mut headers = HeaderMap :: new () ; headers . insert ( USER_AGENT HeaderValue :: from_static ( " reqwest " )) ; headers . insert ( CONTENT_TYPE HeaderValue :: from_static ( " image / png " )) ; headers }
fn run() -> result<(), box<std::error::error>> {
None
ok(())
None
}
None