- changed: The inner error of a
JsonRejection
is now
serde_path_to_error::Error<serde_json::Error>
. Previously it was
serde_json::Error
(#1371) - added:
JsonRejection
now displays the path at which a deserialization
error occurred too (#1371) - fixed: Support streaming/chunked requests in
ContentLengthLimit
(#1389) - fixed: Used
400 Bad Request
forFailedToDeserializeQueryString
rejections, instead of422 Unprocessable Entity
(#1387) - added: Add
middleware::from_extractor_with_state
and
middleware::from_extractor_with_state_arc
(#1396) - added: Add
DefaultBodyLimit::max
for changing the default body limit (#1397) - added: Add
map_request
,map_request_with_state
, and
map_request_with_state_arc
for transforming the request with an async
function (#1408) - added: Add
map_response
,map_response_with_state
, and
map_response_with_state_arc
for transforming the response with an async
function (#1414) - breaking:
ContentLengthLimit
has been removed.Use DefaultBodyLimit
instead (#1400) - changed:
Router
no longer implementsService
, call.into_service()
on it to obtain aRouterService
that does (#1368) - added: Add
Router::inherit_state
, which creates aRouter
with an
arbitrary state type without actually supplying the state; such aRouter
can't be turned into a service directly (.into_service()
will panic), but
can be nested or merged into aRouter
with the same state type (#1368) - changed:
Router::nest
now only acceptsRouter
s, the general-purpose
Service
nesting method has been renamed tonest_service
(#1368) - added: Support compiling to WASM. See the
simple-router-wasm
example
for more details (#1382) - breaking: New
tokio
default feature needed for WASM support. If you
don't need WASM support but havedefault_features = false
for other reasons
you likely need to re-enable thetokio
feature (#1382) - breaking:
handler::{WithState, IntoService}
are merged into one type,
namedHandlerService
(#1418) - changed: The default body limit now applies to the
Multipart
extractor (#1420) - added: String and binary
From
impls have been added toextract::ws::Message
to be more inline withtungstenite
(#1421) - added: Add
#[derive(axum::extract::FromRef)]
([#1430]) - added:
FromRequest
andFromRequestParts
derive macro re-exports from
[axum-macros
] behind themacros
feature (#1352) - breaking:
MatchedPath
can now no longer be extracted in middleware for
nested routes (#1462) - added: Add
extract::RawForm
for accessing raw urlencoded query bytes or request body (#1487) - breaking: Rename
FormRejection::FailedToDeserializeQueryString
to
FormRejection::FailedToDeserializeForm
(#1496)