Provides support to override API/HTML/* response using simple Find & Replace steps. No external app installation required
# chrome-response-override
Chrome devtools extension to modify response on the fly, no external app installation required.
Provide support to override API/HTML/* response using simple Find & Replace steps. No external app installation required.
Steps to override response body in chrome extension
1) Open devtools, navigate to "Response Override" tab
2) Click "Add Row"
3) Enter URL contains value only this URL response will be modified. If you want to modify URL in home page like www.example.com and no URI Path, use Special variable called ~NO_URI~ in URL contains field.
4) Enter Find value It's a javascript regex pattern.
5) Enter Replace value to replace with. No need to provide content-type
6) Click "Save" to save everything.
7) Click "Play" button to start modifying response.
8) You must click pause button to stop this modification.
9) You must keep this devtools open
10) Issue with the override, either open private tab with only this plugin enabled in private tab or please try disabling other plugins working with network, like request header modifier and run this plugin again. If the other plugins using old network API may affect this plugin
Ex.
If you want to add new node in json.
Find: "existingNode":"existingValue"
Replace: "existingNode":"existingValue", "newNode": "newValue"
If you want to modify URL in home page like on www.example.com page and no URI Path, use Special variable called ~NO_URI~ in URL contains field.
Special Variable
1. If you put "~NO_API~" (without ") in Find, no remote call will be made, provide full response. Provide content-type in this case.
2. If you want to modify URL in home page like on www.example.com page and no URI Path, use Special variable called ~NO_URI~ in URL contains field.
How This works: This devtools extension add network break point and listen to URL contains the user input Make API Client call and get response. Do Find and Replace on top of response. Serve the replaced response.
New on V1.7:
1.Moving away from chrome.tabs.getSelected to chrome.tabs.query
New on V1.6:
1. Fix using "/" in URL contains breaking page. Instead please use ~NO_URI~
Project space: https://github.com/Pasupathi-Rajamanickam/chrome-response-override
Latest reviews
- (2023-07-29) Gábor Balogh: Works as expected!
- (2023-05-16) NOT WORKING
- (2022-05-08) Mustang: It does the job, but unfortunately it only works when devtools are open, which makes it useless for me.
- (2022-03-23) whister castal: terrible extension.
- (2022-03-11) Colton Snyder: I'm sure this is great when it works but it appears that for me, on Chrome 99, when the Play button is clicked, no TabID is ever returned because chrome.tabs.getSelected no longer works or is bugged when it's called from developer tools. I am not good with JS but after a few hours of trying to use the newer chrome.tabs.query, instead of chrome.tabs.getSelected, I was not able to get it to work. Without being able to get the TabID, this extension will not work and I do not want to go back to version 40 or prior to get this to work.
- (2022-02-01) Aaron Grogg: Cannot find it in DevTools... Installed, manage Extensions says it is "Active", but when I open DevTools, there is no Response Override tab as in screenshots... How can I use this?
- (2021-08-27) Attila Nagy: Not working at all. No feedback after clicking pause/start buttons.
- (2021-08-25) Nicolae Godina: Not working, CORS error
- (2021-08-11) Andreas H.: It seems to just block the response I want to change... Should this extension still work? If yes, please tell here how to use it properly. Thanks! PS: I suggest to demonstrate the functionality with a publicly available website (say Wikipedia) so everyone can follow your steps.
- (2021-06-10) Abdul Wadood: This simple extension saved my time. Thank you very much Pasupathi Rajamanickam
- (2021-03-18) Joseph Sebastian: Not working anymore. It used to work exactly how I inteded it to. I was able to change response body but recently it is giving CORS error.
- (2021-03-03) pete gfb: Didn't work. I tried everything! I disabled all other extensions. I tried SEVERAL different regex patterns in Find. I quit chrome altogether (no running instances) and restarted. Nothing got it to replace anything in the response1
- (2021-02-22) Aurélien Aurélien: Didn't work. Blocked everything.
- (2021-02-03) John Holmstadt: Didn't work. Couldn't get any rules to dave
- (2020-03-02) How did this not exist until now? Thanks Pasupathi for the debugging tool!