reqMerge
Intelligently merges specified data objects into the request body, suitable for modifying partial parameters without affecting the remaining content. Supports multiple request formats:
- Regular form data (
application/x-www-form-urlencoded) - File upload form (
multipart/form-data) - JSON requests (
application/json)
Rule Syntax
txt
pattern reqMerge://value [filters...]| Parameters | Description | Detailed Documentation |
|---|---|---|
| pattern | Expression to match against the request URL | Match Pattern Documentation |
| value | Operation data object, supported from the following sources: • Directory/file path • Remote URL • Inline/embedded/Values content | Operation Instruction Documentation |
| filters | Optional filters, supported for matching: • Request URL/Method/Headers/Content • Response Status Code/Headers | Filter Documentation |
Configuration Example
Inline Method
txt
www.example.com/path reqMerge://test=123 reqBody://(name=avenwu) reqType://form method://postRequest content received by the server when accessing https://www.example.com/path/to:
txt
name=avenwu&test=123Inline Method
txt
``` reqMerge.json
a.b.c: 123
c\.d\.e: abc
```
www.example.com/path reqMerge://{reqMerge.json} reqBody://({"name":"avenwu"}) reqType://json method://postAccess https://www.example.com/path/to and capture the request content:
js
{"name":"avenwu","a":{"b":{"c":123}},"c.d.e":"abc"}Local/Remote Resources
txt
www.example.com/path1 reqMerge:///User/xxx/test.json
www.example.com/path2 reqMerge://https://www.xxx.com/xxx/params.json
# Editing a temporary file
www.example.com/path3 reqMerge://temp/blank.jsonNote: Request Size Limit
To ensure processing performance, reqMerge enforces a default size limit for request content.
- Limit Specification: The automatic merge processing is only applied to requests with a body size less than 2MB. Requests exceeding this size will be skipped.
- How to Override: If you need to handle larger requests, you can explicitly enable this capability by adding the following directive to your matching rule:
txt
pattern enable://reqMergeBigData
# or
www.example.com/path1 reqMerge:///User/xxx/test.json lineProps://enableBigDataOnce enabled, reqMerge will attempt to process larger request volumes. Please note that this may increase memory consumption and processing time.
Associated Protocols
- Inject content before the request content (
Prepend To Body): reqPrepend - Replace request content (
Replace Body): reqBody - Append content after the request content (
Append To Body): reqAppend - Replace request content using keywords or regular expressions: reqReplace
- Override JSON/Form objects in the request content: reqMerge
- Delete a property from a JSON/Form object in the request content: delete://reqBody.xxx