This feature allows you to modify the response body of a request.
Using this feature may cause the following issues:
On Chrome, you may see a prompt indicating that "Header Editor" started debugging this browser
. This is because HE uses the chrome.debugger API. If you prefer not to see this prompt, you can:
--silent-debugger-extension-api
parameter when running Chrome.HE uses UTF-8 to decode transmitted content by default. If the website is not encoded in UTF-8, you will need to manually specify the encoding.
Please note that this encoding is only used for decoding. The modified response is always encoded in UTF-8.
If you don't know the encoding used by a webpage, open the console (press F12), switch to the Network tab, refresh the current page, and observe the Content-Type in the Response Headers.
In Chrome, you can choose when to intercept the request.
Content-Type
.In Firefox, this is always the response stage.
The function takes two parameters: the first is the decoded text, and the second is the custom function's detail object. The function returns the modified text.
For example, the following function replaces all occurrences of "baidu" on a webpage with "Google."
You can use detail.browser
to get the browser type, which can be either chrome
or firefox
.