24 releases
0.6.2 | Nov 18, 2024 |
---|---|
0.5.2 | Feb 23, 2024 |
0.5.0 | Nov 21, 2023 |
0.4.3 | Jul 20, 2023 |
0.0.0 | Mar 10, 2017 |
#4 in Web programming
4,259,313 downloads per month
Used in 1,171 crates
(562 directly)
680KB
14K
SLoC
Tower HTTP
Tower middleware and utilities for HTTP clients and servers.
More information about this crate can be found in the crate documentation.
Middleware
Tower HTTP contains lots of middleware that are generally useful when building HTTP servers and clients. Some of the highlights are:
Trace
adds high level logging of requests and responses. Supports both regular HTTP requests as well as gRPC.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.
The middleware were originally extracted from one of @EmbarkStudios internal projects.
Examples
The examples folder contains various examples of how to use Tower HTTP:
- warp-key-value-store: A key/value store with an HTTP API built with warp.
- tonic-key-value-store: A key/value store with a gRPC API and client built with tonic.
- axum-key-value-store: A key/value store with an HTTP API built with axum.
Minimum supported Rust version
tower-http's MSRV is 1.66.
Getting Help
If you're new to tower its guides might help. In the tower-http repo we also
have a number of examples showing how to put everything together.
You're also welcome to ask in the #tower
Discord channel or open an
issue with your question.
Contributing
🎈 Thanks for your help improving the project! We are so happy to have you! We have a contributing guide to help you get involved in the Tower HTTP project.
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
~0.7–9MB
~118K SLoC