micromata / http-fake-backend

Build a fake backend by providing the content of JSON files or JavaScript objects through configurable routes.
MIT License
311 stars 22 forks source link

Does this support POST? #22

Open merqrial opened 3 years ago

merqrial commented 3 years ago

Hello, does this support POST?

module.exports = SetupEndpoint({ name: 'anotherExample', urls: [{ params: '/write', requests: [{ method: 'POST', response: '/response-files/anotherExample.json', requestData: ?? }] }] });

mischah commented 3 years ago

Of course it does.

Have a look at the advanced example to see how to use different HTTP requests methods.

Aarti-Dangi commented 2 years ago

I have the same issue, i am not able to run POST calls with this , i tried to add 'body' along with method : POST, but getting 'method not allowed', for post calls. Any changes required in SupportedMethod.js??