mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-24 00:00:16 +02:00
I think `BodyStream` is more useful without being generic over the request body. I'm also looking into adding a response body from a stream called `StreamBody` which will work pretty much opposite to this.
8.3 KiB
8.3 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
- Overall compile time improvements. If you're having issues with compile time please file an issue!
- Add dedicated
Routerto replace theRoutingDsltrait (#214) - Make
FromRequestdefault to being generic overbody::Body(#146) - Implement
std::error::Errorfor all rejections (#153) - Add
Router::orfor combining routes (#108) - Add
handle_errortoservice::OnMethod(#160) - Add
OriginalUrifor extracting original request URI in nested services (#197) - Implement
FromRequestforhttp::Extensions - Add
Headersfor easily customizing headers on a response (#193) - Add
Redirectresponse (#192) - Make
RequestParts::{new, try_into_request}public (#194) - Support matching different HTTP methods for the same route that aren't defined
together. So
Router::new().route("/", get(...)).route("/", post(...))now accepts bothGETandPOST. Previously onlyPOSTwould be accepted (#224)
Breaking changes
- Remove
prelude. Explicit imports are now required (#195) - Replace
axum::route(...)withaxum::Router::new().route(...). This means there is now only one way to create a new router. Same goes foraxum::routing::nest. (#215) - Add associated
BodyandBodyErrortypes toIntoResponse. This is required for returning responses with bodies other thanhyper::Bodyfrom handlers. See the docs for advice on how to implementIntoResponse(#86) - Implement SSE as an
IntoResponseinstead of a service (#98) - Replace
body::BoxStdErrorwithError, which supports downcasting (#150) getroutes will now also be called forHEADrequests but will always have the response body removed (#129)- Change WebSocket API to use an extractor (#121)
- Make WebSocket
Messagean enum (#116) WebSocketnow usesErroras its error type (#150) behavior (#120)- Implement
routing::MethodFilterviabitflags - Removed
extract::UrlParamsandextract::UrlParamsMap. Useextract::Pathinstead EmptyRouternow requires the response body to implementSend + Sync + 'static'(#108)extractor_middlewarenow requiresRequestBody: Default(#167)- Convert
RequestAlreadyExtractedto an enum with each possible error variant (#167) Router::check_infalliblenow returns aCheckInfallibleservice. This is to improve compile times.Router::into_make_servicenow returnsrouting::IntoMakeServicerather thantower::make::Shared(#229)- All usage of
tower::BoxErrorhas been replaced withaxum::BoxError(#229) tower::util::Eitherno longer implementsIntoResponse(#229)extract::BodyStreamis no longer generic over the request body (#234)extract::Bodyhas been renamed toextract::RawBodyto avoid conflicting withbody::Body- These future types have been moved
extract::extractor_middleware::ExtractorMiddlewareResponseFuturemoved toextract::extractor_middleware::future::ResponseFuture(#133)routing::BoxRouteFuturemoved torouting::future::BoxRouteFuture(#133)routing::EmptyRouterFuturemoved torouting::future::EmptyRouterFuture(#133)routing::RouteFuturemoved torouting::future::RouteFuture(#133)service::BoxResponseBodyFuturemoved toservice::future::BoxResponseBodyFuture(#133)
- The following types no longer implement
Copy(#132)EmptyRouterExtractorMiddlewareExtractorMiddlewareLayerQueryStringMissing
RequestPartschanges (#153)methodnew returns an&http::Methodmethod_mutnew returns an&mut http::Methodtake_methodhas been removedurinew returns an&http::Uriuri_mutnew returns an&mut http::Uritake_urihas been removed
- These rejections have been removed as they're no longer used
- The following services have new response future types:
service::OnMethodhandler::OnMethodrouting::Nested
- Remove
axum::sse(#98) - Add default feature
tower-logwhich exposestower'slogfeature. (#218)
0.1.3 (06. August, 2021)
- Fix stripping prefix when nesting services at
/(#91) - Add support for WebSocket protocol negotiation (#83)
- Use
pin-project-liteinstead ofpin-project(#95) - Re-export
httpcrate andhyper::Server(#110) - Fix
QueryandFormextractors giving bad request error when query string is empty. (#117) - Add
Pathextractor. (#124) - Fixed the implementation of
IntoResponseof(HeaderMap, T)and(StatusCode, HeaderMap, T)would ignore headers fromT(#137) - Deprecate
extract::UrlParamsandextract::UrlParamsMap. Useextract::Pathinstead (#138)
0.1.2 (01. August, 2021)
- Implement
StreamforWebSocket(#52) - Implement
SinkforWebSocket(#52) - Implement
Derefmost extractors (#56) - Return
405 Method Not Allowedfor unsupported method for route (#63) - Add extractor for remote connection info (#55)
- Improve error message of
MissingExtensionrejections (#72) - Improve documentation for routing (#71)
- Clarify required response body type when routing to
tower::Services (#69) - Add
axum::body::box_bodyto converting anhttp_body::Bodytoaxum::body::BoxBody(#69) - Add
axum::ssefor Server-Sent Events (#75) - Mention required dependencies in docs (#77)
- Fix WebSockets failing on Firefox (#76)
0.1.1 (30. July, 2021)
- Misc readme fixes.
0.1.0 (30. July, 2021)
- Initial release.