http
A set of types for representing HTTP requests and responses.
1.5.0
941M downloads/mo
#55 most downloaded on crates.io
hyperium/http
What this package is like to depend on
Last release 25 days ago
29 Jul 2026
Ships fairly regularly
a new release about every 4 months
Nearly every release is documented
notes for 42 of 44 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
45 releases · first in 2014
4 releases in the last 12 months
see the full history below
Release timeline
45 releases · Nov 2014 to Jul 2026Releases
latest 45-
1.5.029 Jul 2026Release notes
Open source →What's Changed
- feat(method): add QUERY method by @seanmonstar in #798
- fix(uri): allow empty paths in uri::Builder by @seanmonstar in #853
- perf(header,uri): faster value validation, URI parse/format, map inserts by @geeknoid in #852
- fix(uri): enforce max length in PathAndQuery by @seanmonstar in #856
New Contributors
Full Changelog: v1.4.2...v1.5.0
Release notes
Open source →- Add
Method::QUERYconstant for the new QUERY method defined in RFC 10008. - Fix
uri::Builder::path_and_query()to allow empty strings to mean no path. - Fix
uri::PathAndQueryparsing to enforce URI max length.
-
1.4.208 Jun 2026Release notes
Open source →What's Changed
- feat(method): impl PartialOrd + Ord by @mmirate in #840
- fix(uri): allow STAR paths with scheme/auth by @seanmonstar in #843
- fix: reject DEL character by @Isvane in #842
New Contributors
Full Changelog: v1.4.1...v1.4.2
Release notes
Open source →- Fix
uri::Builderto allow"*"as the path when scheme and authority are also set, used in HTTP/2 requests. - Fix
Urito properly rejectDELcharacters.
-
1.4.125 May 2026Release notes
Open source →tl;dr
- Fix
PathAndQuery::from_static()andfrom_shared()to reject inputs that do not start with/. - Fix
ExtendforHeaderMapto clamp max size hint and not overflow. - Fix
header::IntoIterthat could use-after-free if the generic value type could panic on drop. - Fix
header::{IterMut, ValuesIterMut}to not violate stacked borrows.
What's Changed
- chore(header): fix clippy::assign_op_pattern by @rxc-amzn in #806
- ci: pin itoa in msrv job by @seanmonstar in #813
- Remove unnecessary explicit lifetimes by @jplatte in #815
- chore(ci): update to actions/checkout@v6 by @tottoto in #819
- tests: update to rand 0.10 by @tottoto in #818
- refactor: Remove usage of float instruction by @AurelienFT in #823
- refactor(uri): consolidate PathAndQuery::from_shared and from_static by @seanmonstar in #825
- fix(uri): reject Path::from_shared/from_static if doesn't start with slash by @seanmonstar in #826
- Rephrase comment by @daalfox in #827
- Fix typo in request builder docs by @vleksis in #831
- fix: clamp Extend size hint so HeaderMap reserve cannot overflow by @SAY-5 in #833
- fix(headers): fix stacked borrows for IterMut/ValuesIterMut by @seanmonstar in #837
- fix(header): use a set_len guard in IntoIter drop by @seanmonstar in #838
New Contributors
- @rxc-amzn made their first contribution in #806
- @AurelienFT made their first contribution in #823
- @daalfox made their first contribution in #827
- @vleksis made their first contribution in #831
- @SAY-5 made their first contribution in #833
Full Changelog: v1.4.0...v1.4.1
Release notes
Open source →- Fix
PathAndQuery::from_static()andfrom_shared()to reject inputs that do not start with/. - Fix
ExtendforHeaderMapto clamp max size hint and not overflow. - Fix
header::IntoIterthat could use-after-free if the generic value type could panic on drop. - Fix
header::{IterMut, ValuesIterMut}to not violate stacked borrows.
- Fix
-
1.4.024 Nov 2025Release notes
Open source →Highlights
- Add
StatusCode::EARLY_HINTSconstant for 103 Early Hints. - Make
StatusCode::from_u16now aconst fn. - Make
Authority::from_staticnow aconst fn. - Make
PathAndQuery::from_staticnow aconst fn. - MSRV increased to 1.57 (allows legible const fn panic messages).
What's Changed
- Updated Rand dependency to v0.9.1 by @FarzadMohtasham in #763
- Fix compilation on latest nightly by @akonradi-signal in #769
- Avoid unnecessary .expect()s for empty HeaderMap by @akonradi-signal in #768
- feat: show types in
Extensionsdebug output by @crepererum in #773 - Docs: Clarify the
HeaderMapdocumentaion by @Sol-Ell in #774 - style: update format for tests by @seanmonstar in #782
- Make
StatusCode::from_u16const by @coolreader18 in #761 - docs: Fix typo 'an' to 'and' in http::status module documentation by @zxzxovo in #784
- fix: Prevent panic in try_reserve/try_with_capacity on capacity overflow by @AriajSarkar in #787
- fix: Add reserve() to Extend impl for (Option, T)) by @AriajSarkar in #788
- chore: minor improvement for docs by @claudecodering in #790
- chore: bump MSRV to 1.57 by @seanmonstar in #793
- Add EARLY_HINTS status code by @mdevino in #758
- refactor(header): use better panic message in const HeaderName and HeaderValue by @seanmonstar in #797
- docs: remove unnecessary extern crate sentence by @tottoto in #799
- chore(ci): update to actions/checkout@v5 by @tottoto in #800
- feat(uri): make
Authority/PathAndQuery::from_staticconst by @WaterWhisperer in #786 - refactor(header): inline FNV hasher to reduce dependencies by @seanmonstar in #796
- v1.4.0 by @seanmonstar in #803
New Contributors
- @FarzadMohtasham made their first contribution in #763
- @akonradi-signal made their first contribution in #769
- @crepererum made their first contribution in #773
- @Sol-Ell made their first contribution in #774
- @coolreader18 made their first contribution in #761
- @zxzxovo made their first contribution in #784
- @AriajSarkar made their first contribution in #787
- @claudecodering made their first contribution in #790
- @mdevino made their first contribution in #758
- @WaterWhisperer made their first contribution in #786
Full Changelog: v1.3.1...v1.4.0
Release notes
Open source →- Add
StatusCode::EARLY_HINTSconstant for 103 Early Hints. - Make
StatusCode::from_u16now aconst fn. - Make
Authority::from_staticnow aconst fn. - Make
PathAndQuery::from_staticnow aconst fn. - MSRV increased to 1.57 (allows legible const fn panic messages).
- Add
-
1.3.111 Mar 2025Release notes
Open source →What's Changed
- fix: validate path bytes are at least utf8 by @seanmonstar in #756
Full Changelog: v1.3.0...v1.3.1
-
1.3.011 Mar 2025Release notes
Open source →What's Changed
- Allow most UTF-8 characters in URI path and query. (#715)
- This means paring
Uris with previously illegal characters according the original RFC will now be accepted. They used to be rejected in the name of spec purity, but many operators were using a fork ofhttpbecause reality is that most characters are seen in the real world.
- This means paring
- Fix
HeaderMap::reserve()to allocate sufficient capacity.
New Contributors
- @joelwurtz made their first contribution in #715
- @ADD-SP made their first contribution in #738
- @kawaemon made their first contribution in #741
- @DaniPopes made their first contribution in #748
- @jpds made their first contribution in #695
Thanks!
Full Changelog: v1.2.0...v1.3.0
Release notes
Open source →- Allow most UTF-8 characters in URI path and query.
- Fix
HeaderMap::reserve()to allocate sufficient capacity.
- Allow most UTF-8 characters in URI path and query. (#715)
-
1.2.003 Dec 2024Release notes
Open source →What's Changed
- Add
StatusCode::TOO_EARLYconstant for 425 status. (#725) - Loosen
TryFrom<HashMap>forHeaderMapto work with any state generic. (#729) - Change
Buildermethods to useTryIntoinstead ofTryFromarguments. (#730) - Make
StatusCode::as_u16aconstfunction. (#680) - Fix
Methodparsing to allow#$%&'characters. (#713) - Fix
HeaderNameparsing to reject"characters. (#716) - Fix off by 1 error in
Method::from_bytesthat could cause extra allocations. (#708) - Fix
HeaderMapcapacity calculation in some cases (#710)
New Contributors
- @lgmsantos made their first contribution in #559
- @Pi-Cla made their first contribution in #690
- @franfastly made their first contribution in #713
- @wyatt-herkamp made their first contribution in #714
- @chen-hongzhi made their first contribution in #716
- @39zde made their first contribution in #718
- @gretchenfrage made their first contribution in #722
- @alistaircarscadden made their first contribution in #724
- @cemoktra made their first contribution in #725
- @Qqwy made their first contribution in #729
- @SmolPatches made their first contribution in #730
- @dlzht made their first contribution in #708
- @asudox made their first contribution in #705
- @WhyNotHugo made their first contribution in #680
Thanks
Full Changelog: v1.1.0...v1.2.0
Release notes
Open source →- Add
StatusCode::TOO_EARLYconstant for 425 status. - Loosen
TryFrom<HashMap>forHeaderMapto work with any state generic. - Change
Buildermethods to useTryIntoinstead ofTryFromarguments. - Make
StatusCode::as_u16aconstfunction. - Fix
Methodparsing to allow#$%&'characters. - Fix
HeaderNameparsing to reject"characters. - Fix off by 1 error in
Method::from_bytesthat could cause extra allocations.
- Add
-
1.1.004 Mar 2024Release notes
Open source →What's Changed
- Add methods to allow trying to allocate in the
HeaderMap, returning an error if oversize instead of panicking. - Add
Extensions::get_or_insert()method. - Implement
From<Uri>foruri::Builder. - Fix
HeaderName::from_lowercasethat could allow NUL bytes in some cases.
New Contributors
- @tottoto made their first contribution in #645
- @julianbraha made their first contribution in #652
- @LukeMathWalker made their first contribution in #654
- @mattgathu made their first contribution in #660
- @LukasKalbertodt made their first contribution in #667
- @dswij made their first contribution in #673
Full Changelog: v1.0.0...v1.1.0
Release notes
Open source →- Add methods to allow trying to allocate in the
HeaderMap, returning an error if oversize instead of panicking. - Add
Extensions::get_or_insert()method. - Implement
From<Uri>foruri::Builder. - Fix
HeaderName::from_lowercasethat could allow NUL bytes in some cases.
- Add methods to allow trying to allocate in the
-
1.0.015 Nov 2023Release notes
Open source →What's Changed
- Implement
CloneforRequest,Response, andExtensions. This breaking change requires
that all extensions now implementClone. - Add a default-on
stdfeature. Disabling it currently is not supported. - Fix MIRI warnings in
HeaderMap::iter().
New Contributors
Release notes
Open source →- Implement
CloneforRequest,Response, andExtensions. This breaking change requires that all extensions now implementClone. - Add a default-on
stdfeature. Disabling it currently is not supported. - Fix MIRI warnings in
HeaderMap::iter().
- Implement
-
0.2.1204 Mar 2024Release notes
Open source →What's Changed
- Add methods to allow trying to allocate in the
HeaderMap, returning an error if oversize instead of panicking. - Fix
HeaderName::from_lowercasethat could allow NUL bytes in some cases.
- Add methods to allow trying to allocate in the
-
0.2.1113 Nov 2023Nothing published for this version
-
0.2.1010 Nov 2023Release notes
Open source →- Fix parsing of
Authorityto handle square brackets in incorrect order. - Fix
HeaderMap::with_capacity()to handle arithmetic overflow.
- Fix parsing of
-
0.2.917 Feb 2023Release notes
Open source →- Add
HeaderNameconstants forcache-statusandcdn-cache-control. - Implement
HashforPathAndQuery. - Re-export
HeaderNameat crate root.
- Add
-
0.2.806 Jun 2022Release notes
Open source →- Fix internal usage of uninitialized memory to use
MaybeUninitinsideHeaderName.
- Fix internal usage of uninitialized memory to use
-
0.2.728 Apr 2022Release notes
Open source →- MSRV bumped to
1.49. - Add
extend()method toExtensions. - Add
From<Authority>andFrom<PathAndQuery>impls forUri. - Make
HeaderName::from_staticaconst fn.
- MSRV bumped to
-
0.2.630 Dec 2021 -
0.2.521 Sep 2021Release notes
Open source →- Add
is_empty()andlen()methods toExtensions. - Add
version_ref()method torequest::Builder. - Implement
TryFrom<Vec<u8>>andTryFrom<String>forAuthority,Uri,PathAndQuery, andHeaderName. - Make
HeaderValue::from_staticaconst fn.
- Add
-
0.2.407 Apr 2021 -
0.2.308 Jan 2021 -
0.2.215 Dec 2020Release notes
Open source →- Fix (potential double) panic of (
HeaderMap)OccupiedEntry::remove_entryandremove_entry_multwhen multiple values are present. ([#446], [#449] dekellum) - Safety audits of (priv)
ByteStrand refactor ofAuthority([#408], [#414] sbosnick) - Fix
HeaderNameto error instead of panic when input is too long ([#432] [#433] acfoltzer) - Allow
StatusCodeto encode values 100-999 without error. Use of the unclassified range 600-999 remains discouraged. ([#144], [#438], [#443] quininer dekellum) - Add
Stringand&Stringfallible conversions toPathAndQuery([#450] mkindahl) - Fix
Authority(andUri) to error instead of panic on unbalanced brackets ([#435], [#445] aeryz)
- Fix (potential double) panic of (
-
0.2.125 Mar 2020Release notes
Open source →- Add
extensions_refandextensions_muttorequest::Builderandresponse::Builder.
- Add
-
0.2.002 Dec 2019Release notes
Open source →- Add
Version::HTTP_3constant. - Add
HeaderValue::from_maybe_shared,HeaderValue::from_maybe_shared_unchecked,Uri::from_maybe_shared,Authority::from_maybe_shared, andPathAndQuery::from_maybe_shared. - Change
request::Builder,response::Builder, anduri::Builderto use by-value methods instead of by-ref. - Change from
HttpTryFromtrait tostd::convert::TryFrom. - Change
HeaderMap::entryto no longer return aResult. - Change
HeaderMap::drainiterator to match the behavior ofIntoIter. - Change
Authority::portto return anOption<Port>instead ofOption<u16>. - Change
Uri::schemeto returnOption<&Scheme>instead ofOption<&str>. - Change
Uri::authorityto returnOption<&Authority>instead ofOption<&str>. - Remove
InvalidUriBytes,InvalidHeaderNameBytes, andInvalidHeaderValueByteserror types. - Remove
HeaderValue::from_shared,HeaderValue::from_shared_unchecked,Uri::from_shared,Authority::from_shared,Scheme::from_shared, andPathAndQuery::from_shared. - Remove
Authority::port_part. - Remove
Uri::scheme_partandUri::authority_part.
- Add
-
0.1.2102 Dec 2019Nothing published for this version
-
0.1.2026 Nov 2019Release notes
Open source →- Fix possible double-free if
header::Drainiterator isstd::mem::forgoten (#357). - Fix possible data race if multiple
header::ValueDrains are iterated on different threads (#362). - Fix
HeaderMap::reservecapacity overflows (#360). - Fix parsing long authority-form
Uris (#351).
- Fix possible double-free if
-
0.1.1915 Oct 2019 -
0.1.1826 Jul 2019Release notes
Open source →- Fix compilation of
HeaderNameparsing on WASM targets (#324). - Implement
HttpTryFrom<HashMap>forHeaderMap(#326). - Export
http::header::HeaderValueashttp::HeaderValue.
- Fix compilation of
-
0.1.1705 Apr 2019Release notes
Open source →- Add
Error::inner_ref()to view the kind of error (#303) - Add
headers_ref()andheaders_mut()methods torequest::Builderandresponse::Builder(#293)
- Add
-
0.1.1619 Feb 2019 -
0.1.1522 Jan 2019Release notes
Open source →- Fix
Uri::host()to include brackets of IPv6 literals (#292) - Add
scheme_strandport_u16methods toUri(#287) - Add
method_ref,uri_ref, andheaders_reftorequest::Builder(#284)
- Fix
-
0.1.1421 Nov 2018Release notes
Open source →- Add
Portstruct (#252, #255, #265) - Introduce
Uribuilder (#219) - Empty
Methodno longer considered valid (#262) - Fix
Uriequality when terminating question mark is present (#270) - Allow % character in userinfo (#269)
- Support additional tokens for header names (#271)
- Export
http::headers::{IterMut, ValuesMut}(#278)
- Add
-
0.1.1314 Sep 2018Release notes
Open source →- impl
fmt::DisplayforHeaderName(#249) - Fix
uri::Authorityparsing when there is no host after an@(#248) - Fix
Uriparsing to allow more characters in query strings (#247)
- impl
-
0.1.1208 Sep 2018 -
0.1.1105 Sep 2018Release notes
Open source →- Add
From<&Self>forHeaderValue,Method, andStatusCode(#238) - Add
Uri::from_static(#240)
- Add
-
0.1.1008 Aug 2018 -
0.1.907 Aug 2018Release notes
Open source →- Fix double percent encoding (#233)
- Add additional HttpTryFrom impls (#234)
-
0.1.823 Jul 2018Release notes
Open source →- Add fuller set of
PartialEqforMethod(#221) - Reduce size of
HeaderMapby usingBox<[Entry]>instea ofVec(#224) - Reduce size of
Extensionsby storing asOption<Box<AnyMap>>(#227) - Implement
Iterator::size_hintfor most iterators inheader(#226)
- Add fuller set of
-
0.1.723 Jun 2018Release notes
Open source →- Add
From<uN> for HeaderValuefor most integer types (#218). - Add
Uri::into_parts()inherent method (same asParts::from(uri)) (#214). - Fix converting
Uris in authority-form toPartsand then back intoUri(#216). - Fix
Authorityparsing to reject multiple port sections (#215). - Fix parsing 1 character authority-form
Uris into illegal forms (#220).
- Add
-
0.1.613 Jun 2018Release notes
Open source →- Add
HeaderName::from_static()constructor (#195). - Add
Authority::from_static()constructor (#186). - Implement
From<HeaderName>forHeaderValue(#184). - Fix duplicate keys when iterating over
header::Keys(#201).
- Add
-
0.1.528 Feb 2018Release notes
Open source →- Add websocket handshake related header constants (#162).
- Parsing
Authoritywith an empty string now returns an error (#164). - Implement
PartialEq<u16>forStatusCode(#153). - Implement
HttpTryFrom<&Uri>forUri(#165). - Implement
FromStrforMethod(#167). - Implement
HttpTryFrom<String>forUri(#171). - Add
into_bodyfns toRequestandResponse(#172). - Fix
Request::options(#177).
-
0.1.405 Jan 2018Release notes
Open source →- Add PathAndQuery::from_static (#148).
- Impl PartialOrd / PartialEq for Authority and PathAndQuery (#150).
- Add
mapfn toRequestandResponse(#151).
-
0.1.311 Dec 2017 -
0.1.230 Nov 2017 -
0.1.109 Oct 2017Release notes
Open source →- Provide Uri accessors for parts (#129)
- Add Request builder helpers. (#123)
- Misc performance improvements (#126)
-
0.1.008 Sep 2017 -
0.0.0-prealpha20 Nov 2014 pre-releaseNothing published for this version