Debugging proxy that will allow you to intercept and mutate requests from a web page
Local Response
Consider this simple page - https://carlpaton.github.io/d/netify/
The SHOULD 200
button does a GET
to https://carlpaton.github.io/d/netify/sample.json
The JSON response is then shown in the LOG, sweet.
Now to intercept that request create a rule that matches
- Request filter: https://carlpaton.github.io/d/netify/sample.json
- Set to HXR and GET
Check Local Response and set:
- Status code: 200
- Set headers: for this example they can be left blank as the page doesnt care
- Body
1 | { "foo": "naa take this" } |
Click Inactivate
to change the plugin to be Listening
, now click CLEAR LOG
and then SHOULD 200
. The new intercepted response is now shown.
This can be seen in the network tab:
Headers
Some example headers you may needs to set if your request tells you off.
1 | Content-Type: application/json; charset=utf-8 |