Request parser with fallback #2839
Unanswered
akaNightmare
asked this question in
Q&A
Replies: 1 comment
-
I don't think there's currently a way to parse something from a query parameter or from header. You could write your own type implementing Or you can write one extractor specifically for this usecase that tries query and then headers for each of your fields. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
Hello, I'm wondering if there any way to parse request with a fallback, example:
so for field1 need to extract value from query params
field1=true
or from headers['x-field1'] and so on.Thanks in advance.
axum version
0.7.5
Beta Was this translation helpful? Give feedback.
All reactions