6 releases
0.2.0 | Nov 20, 2023 |
---|---|
0.1.4 | Sep 10, 2023 |
0.1.3 | Jul 24, 2023 |
#2076 in Asynchronous
665KB
12K
SLoC
Tower Async HTTP
Tower Async middleware and utilities for HTTP clients and servers.
It is a fork of https://github.com/tower-rs/tower-http
and makes use of async traits
to simplify things and make it more easier
to integrate async functions into middleware.
More information about this crate can be found in the crate documentation.
Middleware
Tower Async HTTP contains lots of middleware that are generally useful when building HTTP servers and clients. Some of the highlights are:
Compression
andDecompression
to compress/decompress response bodies.FollowRedirect
to automatically follow redirection responses.
See the docs for the complete list of middleware.
Middleware uses the http crate as the HTTP interface so they're compatible with any library or framework that also uses http. For example hyper.
Supported Rust Versions
Tower Async requires nightly Rust for the time being and has no backwards compatibility promises for the time being.
Once async traits
are stabilized we'll start supporting stable rust once again,
and we can start working towards backwards compatibility.
Read https://blog.rust-lang.org/inside-rust/2023/05/03/stabilizing-async-fn-in-trait.html for more information on this roadmap by the Rust Language Core Team.
Getting Started
If you're brand new to Tower and want to start with the basics we recommend you check out some of the original Tower guides.
We work exactly the same as Tower, expect in an async manner and slightly easier to use as such. But the core ideas are obviously the same, so it should never the less help you to get started.
FAQ
Read the full tower-async
FAQ at https://github.com/plabayo/tower-async#faq.
License
This project is licensed under the MIT license.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Tower HTTP by you, shall be licensed as MIT, without any additional terms or conditions.
Dependencies
~1.7–10MB
~137K SLoC