How to get an array of key-value pairs in a query #1482
Answered
by
jplatte
tingfeng-key
asked this question in
Q&A
-
query:
How to parse beginTime and endTime |
Beta Was this translation helpful? Give feedback.
Answered by
jplatte
Oct 18, 2022
Replies: 1 comment 2 replies
-
Try https://docs.rs/axum-extra/0.4.0-rc.1/axum_extra/extract/struct.Query.html. Otherwise you can make a Query extractor that uses serde_qs |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OP will have to use
serde_qs
,serde_html_form
which theaxum-extra
extractor is based on doesn't really allow this syntax, unless you want a flat list of fields in which caseserde(rename)
works withaxum
sQuery
extractor as well: