resAppend
Inserts the specified content after the existing response body (only valid for status codes with a response body, such as 200/500).
⚠️ Note: Requests without a response body, such as 204 and 304, are not affected.
Rule Syntax
txt
pattern resAppend://value [filters...]| Parameters | Description | Detailed Documentation |
|---|---|---|
| pattern | An expression to match the request URL | Match Pattern Documentation |
| value | Text or binary content. Supports the following types: • Directory/File Path • Remote URL • Inline/Embedded/Values Content | Operation Instruction Documentation |
| filters | Optional filters. Supports matching: • Request URL/Method/Header/Content • Response Status Code/Header | Filter Documentation |
Configuration Example
Inline Method
txt
www.example.com/path resAppend://(Hello) file://(-test-)Requesting https://www.example.com/path/to will result in the response content becoming -test-Hello.
Inline/Values Method
txt
``` body.txt
Hello world.
```
www.example.com/path resAppend://{body.txt} file://(-test-)Requesting https://www.example.com/path/to will result in the response content becoming -test-Hello world..
Local/Remote Resources
txt
www.example.com/path1 resAppend:///User/xxx/test.txt
www.example.com/path2 resAppend://https://www.xxx.com/xxx/params.txt
# Editing a Temporary File
www.example.com/path3 resAppend://temp/blank.txtAssociated Protocols
- Inject content before the response content (
Prepend To Body): resPrepend - Inject HTML content before the response content (
Prepend HTML To Body, response type must betext/html): htmlPrepend - Inject CSS content before the response content (
Prepend CSS To Body, response type must betext/htmlortext/css): cssPrepend - Inject JS content before the response content (
Prepend JS To Body, response type must betext/html,text/css, orapplication/javascript): jsPrepend - Replace the response content (
Replace Body): resBody - Replace the response content with HTML content (
Replace Body, response type must betext/html): htmlBody - Replace the response content with CSS content (
Replace Body, response type must betext/htmlortext/css): cssBody - Replace the response content with JS content (
Replace Body, response type must betext/html,text/css, orapplication/javascript): jsBody - Append content after the response content (
Append To Body): resAppend - Append HTML content after the response content (
Append HTML To Body, response type must betext/html): htmlAppend - Append CSS content after the response content (
Append CSS To Body, response type must betext/htmlortext/css): cssAppend - Append JS content after the response content (
Append JS To Body, response type must betext/html,text/css, orapplication/javascript): jsAppend - Replace the response content using keywords or regular expressions (
Modify Body Text): resReplace - Override JSON/Form objects in the response content (
Modify Form/JSON): resMerge - Delete a property from a JSON/Form object in the response content (
Delete Form/JSON): delete://resBody.xxx