Skip to content

Querystring support? #39

Description

@ebunders

I find it hard to believe it, but it seems that the querystring of the request is totally ignored, and paths with querystrings are not matched. Given this code:

server.on({
    method: 'GET',
    path: '/test?foo=bar',
    reply: {
        status: 200,
        headers: {"content-type": "application/json"},
        body: JSON.stringify({what: 'params'})
    }
});

server.on({
    method: 'GET',
    path: '/test',
    reply: {
        status: 200,
        headers: {"content-type": "application/json"},
        body: JSON.stringify({what: 'no-params'})
    }
});

And then

❯ curl http://localhost:8888/test
{"what":"no-params"}
~ 
❯ curl http://localhost:8888/test?foo=bar
{"what":"no-params"}

Am I missing something?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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