-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
serde query extractor fails on simple enum types #371
Comments
I suppose it might actually be this: nox/serde_urlencoded#35 |
I don’t think we can do anything. This need bug fix from upstream. @Dowwie am I right? |
@fafhrd91 it seems that serde_urlencoded is no longer being maintained.. there's been a pending PR since Feb 2018 that upgrades to support enums: nox/serde_urlencoded#30 I pinged the author weeks ago but haven't gotten any response |
that is unfortunate. so we need fork it or we need replacement |
@Dowwie I'll ping nox on IRC if he is still around there I'll ask him about crate's state |
Please see how you can use enum now https://github.com/actix/actix-web/blob/master/tests/test_handlers.rs#L94-L134 |
I don't even have to try it out, that's my code right there 😄 Thank you for the efficacious remedy. |
Link is outdated 😅 |
It seems that something in how the contents of a query string are passed to serde is causing breakage with simple enum types.
For the enum
and with the handler
a request to
/authorize?...&response_type=code
(orCode
orResponseType::Code
or1
or any of a dozen other permutations I tried) I get back an error along the lines of the following:As you can see from the commented-out code, I also tried playing around with different serde enum representations and formatting options.
The text was updated successfully, but these errors were encountered: