mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-26 23:17:42 +02:00
add Client::headers (#2114)
This commit is contained in:
@ -286,4 +286,12 @@ impl Client {
|
||||
}
|
||||
req
|
||||
}
|
||||
|
||||
/// Get default HeaderMap of Client.
|
||||
///
|
||||
/// Returns Some(&mut HeaderMap) when Client object is unique
|
||||
/// (No other clone of client exists at the same time).
|
||||
pub fn headers(&mut self) -> Option<&mut HeaderMap> {
|
||||
Rc::get_mut(&mut self.0.headers)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user