imbo / behat-api-extension

API extension for Behat, used to ease testing of JSON-based APIs
MIT License
108 stars 42 forks source link

Use HTTP GET when no method is specified #57

Closed christeredvartsen closed 6 years ago

christeredvartsen commented 6 years ago

The requestPath method will not specify HTTP GET internally if no method is given to the step:

 When I request :path

vs

When I request :path using HTTP :method

This PR will make the extension use GET if no other method is explicitly specified, and when automatically doing so it will allow the HTTP method to be overridden internally, if for instance form parameters have been added. When a method is specified using the When I request :path using HTTP :method step it can not be overridden internally.

Resolves #51.