How to use FromRequest with State #1600
-
async fn handler(parts: Multipart, State(s): State<Arc>) -> impl IntoResponse { } let route = Router::new()
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Implemented FromRequest object cannot be used with State |
Beta Was this translation helpful? Give feedback.
-
Try https://docs.rs/axum/latest/axum/attr.debug_handler.html. |
Beta Was this translation helpful? Give feedback.
-
async fn handler(State(s): State<Arc<...>>, parts: Multipart) -> impl IntoResponse {} Documented here |
Beta Was this translation helpful? Give feedback.
Multipart
needs to be the last argument:Documented here