Regression (change?) from 0.6: POST with status code doesn't compile #2662
Answered
by
jplatte
moh-eulith
asked this question in
Q&A
-
Bug ReportVersion0.7.4
The 0.6 versions are a deep dependency. PlatformLinux DescriptionRouter::new().route(
"/json",
post(|payload: Json<serde_json::Value>| async move {
(StatusCode::OK, payload.to_string())
}) no longer compiles in 0.7.4. Used to compile in 0.6. the problem is the status code. just |
Beta Was this translation helpful? Give feedback.
Answered by
jplatte
Mar 19, 2024
Replies: 1 comment 1 reply
-
Hi, could it be that you're trying to return an |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
moh-eulith
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, could it be that you're trying to return an
http 0.2.x
status code? Try importing fromaxum::http
, or upgrading the crate if so.