/// Append a component to a header
Append a component to a header
Append a component to a header
pub fn build_header(headers: &mut HeaderMap, name: &str, value: &str) -> Result<()> {
    let name = HeaderName::from_str(name).map_err(Error::request)?;
    let value = HeaderValue::from_str(value).map_err(Error::request)?;
    headers.append(name, value);
    Ok(())
}
pub fn build_header ( headers : & mut HeaderMap , name : & str , value : & str ) -> Result < ( ) > { let name = HeaderName :: from_str ( name ) . map_err ( Error :: request ) ? ; let value = HeaderValue :: from_str ( value ) . map_err ( Error :: request ) ? ; headers . append ( name , value ) ; Ok ( ( ) ) }
Append a component to a header
Append a component to a header
headers
&mut HeaderMap
name
&str
value
&str