- breaking: Update public dependencies. axum now requires
- breaking: axum now requires tower-http 0.5
- breaking: Remove deprecated
WebSocketUpgrade::max_send_queue
- breaking: The following types/traits are no longer generic over the request body
(i.e. theB
type param has been removed) (#1751 and #1789):FromRequestParts
FromRequest
HandlerService
HandlerWithoutStateExt
Handler
LayeredFuture
Layered
MethodRouter
Next
RequestExt
RouteFuture
Route
Router
- breaking: axum no longer re-exports
hyper::Body
as that type is removed
in hyper 1.0. Instead axum has its own body type ataxum::body::Body
(#1751) - breaking:
extract::BodyStream
has been removed asbody::Body
implementsStream
andFromRequest
directly (#1751) - breaking: Change
sse::Event::json_data
to useaxum_core::Error
as its error type (#1762) - breaking: Rename
DefaultOnFailedUpdgrade
toDefaultOnFailedUpgrade
(#1664) - breaking: Rename
OnFailedUpdgrade
toOnFailedUpgrade
(#1664) - breaking:
TypedHeader
has been move toaxum-extra
(#1850) - breaking: Removed re-exports of
Empty
andFull
. Use
axum::body::Body::empty
andaxum::body::Body::from
respectively (#1789) - breaking: The response returned by
IntoResponse::into_response
must use
axum::body::Body
as the body type.axum::response::Response
does this
(#1789) - breaking: Removed the
BoxBody
type alias and itsbox_body
constructor. Useaxum::body::Body::new
instead (#1789) - breaking: Remove
RawBody
extractor.axum::body::Body
implementsFromRequest
directly (#1789) - breaking: The following types from
http-body
no longer implementIntoResponse
:Full
, useBody::from
insteadEmpty
, useBody::empty
insteadBoxBody
, useBody::new
insteadUnsyncBoxBody
, useBody::new
insteadMapData
, useBody::new
insteadMapErr
, useBody::new
instead
- added: Add
axum::extract::Request
type alias where the body isaxum::body::Body
(#1789) - added: Add
Router::as_service
andRouter::into_service
to workaround
type inference issues when callingServiceExt
methods on aRouter
(#1835) - breaking: Removed
axum::Server
as it was removed in hyper 1.0. Instead
useaxum::serve(listener, service)
or hyper/hyper-util for more configuration options (#1868) - breaking: Only inherit fallbacks for routers nested with
Router::nest
.
Routers nested withRouter::nest_service
will no longer inherit fallbacks (#1956) - fixed: Don't remove the
Sec-WebSocket-Key
header inWebSocketUpgrade
(#1972) - added: Add
axum::extract::Query::try_from_uri
(#2058) - added: Implement
IntoResponse
forBox<str>
andBox<[u8]>
([#2035]) - breaking: Simplify
MethodFilter
. It no longer uses bitflags (#2073) - fixed: Fix bugs around merging routers with nested fallbacks (#2096)
- fixed: Fix
.source()
of composite rejections (#2030) - fixed: Allow unreachable code in
#[debug_handler]
(#2014) - change: axum's MSRV is now 1.66 (#1882)
- added: Implement
IntoResponse
for(R,) where R: IntoResponse
(#2143) - changed: For SSE, add space between field and value for compatibility (#2149)
- added: Add
NestedPath
extractor (#1924) - added: Add
handle_error
function to existingServiceExt
trait (#2235) - breaking:
impl<T> IntoResponse(Parts) for Extension<T>
now requires
T: Clone
, as that is required by the http crate (#1882) - added: Add
axum::Json::from_bytes
(#2244) - added: Implement
FromRequestParts
forhttp::request::Parts
(#2328) - added: Implement
FromRequestParts
forhttp::Extensions
(#2328) - fixed: Clearly document applying
DefaultBodyLimit
to individual routes (#2157)