Skip to content

Commit

Permalink
Mutable access to request headers
Browse files Browse the repository at this point in the history
Signed-off-by: itowlson <[email protected]>
  • Loading branch information
itowlson committed Dec 17, 2023
1 parent abd5736 commit 0aa54ac
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sdk/rust/src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ impl Response {
self.headers.iter().map(|(k, v)| (k.as_str(), v))
}

/// The request headers
pub fn headers_mut(&mut self) -> &mut HashMap<String, HeaderValue> {
&mut self.headers
}

/// Return a header value
///
/// Will return `None` if the header does not exist.
Expand Down

0 comments on commit 0aa54ac

Please sign in to comment.