http-types
provides shared types for HTTP operations. It combines a performant, streaming interface with convenient methods for creating headers, urls, and other standard HTTP types. This is part of the http-rs
project and powers the tide
and surf
frameworks. Check out the docs or join us on Zulip.
Highlights
This release introduces several new typed headers:
transfer::TransferEncoding
: The form of encoding used to safely transfer the payload body to the user.
transfer::TE
: Client header advertising the transfer encodings the user agent is willing to accept.
other::RetryAfter
: Indicate how long the user agent should wait before making a follow-up request.
other::Referer
: Contains the address of the page making the request.
content::Accept
: Client header advertising which media types the client is able to understand.
content::ContentType
: Indicate the media type of a resource's content.
Most notably is probably the RetryAfter
header, which can be used to enable load-shedding on the client. An example of such a middleware has been authored for Tide
.
http-types 3.0 merge window opened
This marks the final release of the 2.x release line of http-types
. It's been almost a year since our last major release, and we've decided to open up the merge window for http-types
3.0 now that 2.10.0
has shipped. You can see the nominated items for the next major version as part of the Semver-Major
issue on GitHub.
Because this is the first major release of http-types
we're doing since we moved to our monthly release cadence, we're not entirely sure yet how we'll manage this. Perhaps next month's release may be a beta release. Or we may delay doing a release at all until all items have been merged. We'll have to see, but once 3.0 is out we'll resume the monthly release cadence.
Added
- Add the
Retry-After
type header #314
- Allow omitting cookie support, with a new
"cookies"
feature #306
- Add
Transfer-Encoding
and TE
headers #301
- Add
other::SourceMap
header #278
- Add
other::Referer
header #277
- Add
content::{Accept, ContentType}
headers #270
Changed
- Update examples to use
TryFrom<str>
for Url implementation #294
Internal
- Fix clippy lints #321
- Delete .travis.yml #312
- Refactor media type internals #310
- Make MIME tests conditional on the "fs" feature #307
- Upgrade pin-project-lite to 0.2.0 #299