xebia / mock-rest-request

Mock REST requests in NodeJS
https://xebia.com/blog/mocking-a-rest-backend-for-your-angularjs-grunt-web-application/
Apache License 2.0
12 stars 6 forks source link

Document mock-method header #5

Open tommcintyre opened 8 years ago

tommcintyre commented 8 years ago

Hi,

My use case is to mock a POST API. I discovered by reading the code that this requires sending the "mock-method" header when setting up the mock API, e.g. via the -H option to curl:

curl -v -XPOST -H 'mock-method: POST' -d @my_response.json http://localhost:3000/mock/path/to/my/api

So it would be good to add this to the README.