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

[yesod-test] Add full support for query string #1822

Open
yitz-zoomin opened this issue Sep 19, 2023 · 0 comments
Open

[yesod-test] Add full support for query string #1822

yitz-zoomin opened this issue Sep 19, 2023 · 0 comments

Comments

@yitz-zoomin
Copy link
Contributor

yitz-zoomin commented Sep 19, 2023

Requests in yesod-test only support GET parameters in the format key=value. Bare GET parameters are not supported, and more importantly (for us), you cannot access GET API endpoints that require JSON in the query string.

The wai library supports these use cases by allowing you to supply Nothing for the value of the GET parameter. But yesod-test blocks this by supplying a hard-coded Just. It is hard to work around that restriction, because the RequestBuilderData type is not exported, even in the Internal module.

Note that this is not a problem for POST parameters, because of the postBody and setRequestBody functions.

Fixed by adding the addBareGetParam function in #1821 .

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

No branches or pull requests

1 participant