Skip to content

Querystring support? #39

Open
Open
@ebunders

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?

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