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

When adding request, the HTTP type MUST be lowercase, defying HTTP convention #9

Closed
mboudreau opened this issue Jan 16, 2015 · 1 comment

Comments

@mboudreau
Copy link

This will work:

provider.given('initial state')
    .uponReceiving('a request for all the data')
    .withRequest('get', '/')
    .willRespondWith({
        status: 200,
        headers: { 'Content-Type': 'application/json' },
        body: 'weee'
    });

This will not:

provider.given('initial state')
    .uponReceiving('a request for all the data')
    .withRequest('GET', '/')
    .willRespondWith({
        status: 200,
        headers: { 'Content-Type': 'application/json' },
        body: 'weee'
    });

Spent a good hour trying to figure that tidbit out... Please fix.

@bethesque
Copy link
Member

Duplicate issue: pact-foundation/pact-support#3
It should be fixed in the matching logic, but we can apply a quick fix by lowercasing it in the javascript.

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

2 participants