oh-my-mock
oh-my-mock copied to clipboard
Feature :I hope this tool can .......
- Adding, replacing and removing request headers.
- Replacing the request body, text/JSON, Base64 or form data.
This is indeed not possible. I have to investigate, but I think the only way this is possible is via the "Mocking with code" option

Then you can use FETCH like this

At the moment using fetch will probably give you CORS errors because fetch is executed in a sandbox inside the chrome extension. The only way right now to fix this is to start you browser with web-security disabled. On mac the command looks like this
$> open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-security
But that might not be all, because of this sandbox you might not have the required cookies. Cookie support is something I'm working on right now.
So, long story short, after cookie support I will try to fix this issue!