Skip to content

reqPrepend

Inserts the specified content at the beginning of the existing request body (only valid for requests with a body, such as POST and PUT).

⚠️ Note: GET, HEAD, and other requests without a body are not affected.

Rule Syntax

txt
pattern reqPrepend://value [filters...]
ParametersDescriptionDetailed Documentation
patternAn expression to match against the request URLMatch Pattern Documentation
valueText or binary content. Supports the following types:
• Directory/File Path
• Remote URL
• Inline/Embedded/Values Content
Operation Instruction Documentation
filtersOptional filters. Supports matching:
• Request URL/Method/Header/Content
• Response Status Code/Header
Filter Documentation

Configuration Example

Inline Method

txt
www.example.com/path reqPrepend://(Hello) reqBody://(-test-) method://post

Requesting https://www.example.com/path/to will result in the request body becoming Hello-test-.

Inline/Values Method

txt
``` body.txt
Hello world.
```
www.example.com/path reqPrepend://{body.txt} reqBody://(-test-) method://post

Requesting https://www.example.com/path/to will result in the request body becoming Hello world.-test-.

Local/Remote Resources

txt
www.example.com/path1 reqPrepend:///User/xxx/test.txt
www.example.com/path2 reqPrepend://https://www.xxx.com/xxx/params.txt
# Editing a Temporary File
www.example.com/path3 reqPrepend://temp/blank.txt

Associated Protocols

  1. Inject content before the request body: reqBody
  2. Append content after the request body: reqAppend
  3. Inject content before the response body: resPrepend