21 releases

0.5.2 Feb 23, 2024
0.5.0 Nov 21, 2023
0.4.3 Jul 20, 2023
0.4.0 Feb 24, 2023
0.0.0 Mar 10, 2017

#7 in Web programming

Download history 291601/week @ 2024-01-01 380206/week @ 2024-01-08 397740/week @ 2024-01-15 415250/week @ 2024-01-22 412537/week @ 2024-01-29 406924/week @ 2024-02-05 418126/week @ 2024-02-12 406418/week @ 2024-02-19 460086/week @ 2024-02-26 439466/week @ 2024-03-04 476217/week @ 2024-03-11 470187/week @ 2024-03-18 474959/week @ 2024-03-25 506883/week @ 2024-04-01 492672/week @ 2024-04-08 499664/week @ 2024-04-15

1,995,454 downloads per month
Used in 857 crates (394 directly)

MIT license

13K SLoC

Tower HTTP

Tower middleware and utilities for HTTP clients and servers.

Build status Crates.io Documentation Crates.io

More information about this crate can be found in the crate documentation.


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 and Decompression 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.


The examples folder contains various examples of how to use Tower HTTP:

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.


🎈 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.


This project is licensed under the MIT license.


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.


~124K SLoC