Skip to content
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

Add a Form extractor #140

Closed
wants to merge 1 commit into from
Closed

Add a Form extractor #140

wants to merge 1 commit into from

Conversation

m1guelpf
Copy link
Contributor

@m1guelpf m1guelpf commented Jan 1, 2024

Issue #, if available: N/A

Description of changes: Added an extractor for application/x-www-form-urlencoded requests. This feels common enough that it might warrant inclusion in the framework, but I'll be happy to move it into a third-party package instead.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@LukeMathWalker
Copy link
Owner

It's definitely in scope!
I had a quick look, and I'd say we're 90% there with this PR. I'll do a proper review this afternoon 👍🏻

One thing I noticed it's missing: I'd like the same extractor to handle forms submitted using GET and POST.

@LukeMathWalker
Copy link
Owner

Had a second look: it's all 👍🏻
If we can do the augmentation I described above, we're good to merge.

@m1guelpf
Copy link
Contributor Author

m1guelpf commented Jan 2, 2024

@LukeMathWalker You mean fall back to query parameters if the body is not set?

@LukeMathWalker
Copy link
Owner

No, I mean looking directly at the query parameters if the method is HEAD or GET. See axum's code as a reference for this behaviour.

@LukeMathWalker
Copy link
Owner

Closing this since we merged #255

@m1guelpf m1guelpf deleted the form-extractor branch April 29, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants