Skip to content

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

@yitz-zoomin

Description

@yitz-zoomin

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 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions