12 Commits

Author SHA1 Message Date
David Pedersen
04361b76a7 Upgrade to http-body 1.0 (#348)
* punt on examples for now

* remove dependency on hyper

* port to http-body 1.0

* note which types from http_body_util is in our public api

* wrap body types

* fix some warnings

* comment out compression stuff for now

* validate-request docs

* trace

* timeout

* set_status

* set_header

* serve_dir

* redirect

* follow_redirect

* sensitive_headers

* request_id

* propagate_header

* normalize_path

* in_flight_requests

* map_response_body

* map_request_body

* limit

* lib

* cors

* classify

* add_extension

* catch_panic

* add_authorization

* require_authorization + async_require_authorization

* builder

* format

* fixes

* fix docs

* fix cargo hack

* is this breaking patches in Cargo.toml?

* update to 1.0 of dependencies

* porting compression like this seems to work \o/

* use `BodyExt::collect` in tests

* compression is back!

* and thats decompression!

* remove hyper specific test

* Update examples/axum-key-value-store/src/main.rs

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>

* bring back client examples

* fix doc tests

* forgot ServiceBuilderExt

* changelog

* Fix potential ordering issues with `BodyIntoStream`

* don't delegate `is_end_stream`

* fix typos

* use std::task::ready

* uncomment CompressionLayer in examples

* Derive default

* format

* bring back hyper compat test

* remove lint. Lets just add this back later. Wanna merge now

---------

Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2023-11-21 13:42:35 +00:00
David Pedersen
40607c4dfa Add axum example (#181)
* Add axum example

* clean up
2021-11-22 09:34:59 +01:00
David Pedersen
e84cc6f7f8 Tonic example (#72)
* Tonic example

* Add test for tonic example

* Address review feedback

* Use `impl Trait` for returning the service type
2021-03-21 17:43:25 +01:00
David Pedersen
d8ff7f611d Warp example (#69)
* Add warp example

* Add some more middlewares

* Add test for warp example

* Does this work?

* Change example so we avoid complex type

* Replace `Database` type alias with struct

* Update examples/warp-key-value-store/README.md

Co-authored-by: Daiki Mizukami <tesaguriguma@gmail.com>

Co-authored-by: Daiki Mizukami <tesaguriguma@gmail.com>
2021-02-25 22:21:24 +01:00
David Pedersen
cd9d01fba5 Initial crate setup (#34) 2021-01-26 18:07:10 +01:00
David Pedersen
9ca9e7cc56 Remove all code. We are starting over (#32) 2021-01-26 11:07:07 +01:00
Lucio Franco
044e0ed5ae Remove http-body for the published version (#23) 2019-05-08 14:30:56 -07:00
George Hahn
9b1c592bf6 Add middleware for request modification (#12) 2019-04-10 09:12:22 -07:00
Carl Lerche
f913ff2113 Reoreganize the repository. (#14)
- Split `Body` into an `http-body` crate.
- Rename `tower-http-service` to `tower-http-util`.
- Add a basic `tower-http` crate.
- rustfmt
2019-04-04 11:55:46 -07:00
Carl Lerche
64585dd57e Refresh tower-http (#8)
* Refresh `HttpService` trait.
* Introduce `Body` trait.
* Misc refresh and file moving / renaming.

Closes #6.
2019-03-04 12:07:22 -08:00
Sean McArthur
3599ce02f0 add HttpService alias from tower-h2 2018-11-08 15:19:48 -08:00
Carl Lerche
51cef91f75 Add AddOrigin middleware
AddOrigin adds a constant origin to all requests.
2018-01-22 13:29:51 -08:00