Skip to content

Extracting path using fallible services? #2446

Answered by davidpdrsn
joehdodd asked this question in Q&A
Discussion options

You must be logged in to vote

You can only run extractors from handler functions called by axum. get_person is just a normal rust function and isn’t called by axum. So you to pass in the right arguments like any other function yourself.

I recommend you just use normal handlers without bothering with services, similarly to https://github.com/tokio-rs/axum/blob/main/examples/reqwest-response/src/main.rs

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@joehdodd
Comment options

@davidpdrsn
Comment options

@joehdodd
Comment options

Answer selected by joehdodd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants