From de2e470676de9d81ee5dd872dca444e36c4a851b Mon Sep 17 00:00:00 2001 From: James Lucas <102536031+svix-james@users.noreply.github.com> Date: Wed, 14 Dec 2022 14:40:21 -0600 Subject: [PATCH] Add `get` method to `HeaderCaseMap` (#3) --- src/ext.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ext.rs b/src/ext.rs index 2177351493..e6b29fa529 100644 --- a/src/ext.rs +++ b/src/ext.rs @@ -99,6 +99,11 @@ pub struct HeaderCaseMap(HeaderMap); #[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>(