Skip to content

[FEATURE] Support multi-value query string parameters #754

@silverskater

Description

@silverskater

Is there an existing feature request for this?

  • I have searched the existing feature requests

Is your feature request related to a problem? Please describe.

When using a multi-value query string parameter only the first value is checked.

Url ENDPOINT?sections=90&sections=130 with this check:

r.Queries("sections", "130")

It doesn't match, and it should because the only key-value required matches, but as it only checks the first it encounters (sections=90 in this case), it determines it doesn't match.
getURLQuery() only looks for the first query key: findFirstQueryKey().

Describe the solution that you would like.

Multi-value query params like sections=90&sections=130 should be matched by both commands from below, regardless of the order in the query string:

r.Queries("sections", "130")
r.Queries("sections", "90", "sections", "130")

Describe alternatives you have considered.

No response

Anything else?

This issue came up here: friendsofgo/killgrave#164

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