Skip to content

Commit

Permalink
Add get method to HeaderCaseMap (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
svix-james authored and svix-onelson committed Nov 16, 2023
1 parent d4353bd commit de2e470
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ pub struct HeaderCaseMap(HeaderMap<Bytes>);

#[cfg(feature = "http1")]
impl HeaderCaseMap {
/// Thank you hyper for not just making this public to being with
pub fn get(&self, key: HeaderName) -> Option<&Bytes> {
self.0.get(key)
}

/// Returns a view of all spellings associated with that header name,
/// in the order they were found.
pub(crate) fn get_all<'a>(
Expand Down

0 comments on commit de2e470

Please sign in to comment.