You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would be nice to be able to easily convert from a HashMap<String, String> to a HeaderMap. This might be implemented in a generic way with for instance an
This allows an easy conversion from HashMap<String,String>
to HeaderMap<HeaderValue>.
Doing this conversion used to be unnecessarily verbose
because of the required mapping and error type conversions.
The implementation is generic:
impl<COLLECTION, K, V> HttpTryFrom<COLLECTION> for HeaderMap<HeaderValue>
where
COLLECTION: IntoIterator<Item=(K, V)>,
K: AsRef<str>,
V: AsRef<str>
so it also works for HashMap<HeaderName, String> and for vectors.
Fixeshyperium#325
I would be nice to be able to easily convert from a
HashMap<String, String>
to aHeaderMap
. This might be implemented in a generic way with for instance anSee : seanmonstar/reqwest#555
What do you think ? Would you accept a pull request implementing that ?
The text was updated successfully, but these errors were encountered: