reqCharset
Modify the charset portion of the content-type request header to set the encoding of the request content.
content-typestructure:txt<media-type>; charset=<encoding>
Rule Syntax
txt
pattern reqCharset://encoding [filters...]| Parameters | Description | Detailed Documentation |
|---|---|---|
| pattern | Expression to match against the request URL | Match Pattern Documentation |
| encoding | Encoding name, such as utf8 • Inline/Embedded/Values content ⚠️ Loading data from files/remote URLs is not supported | |
| filters | Optional filters, supports matching: • Request URL/Method/Header/Content • Response Status Code/Header | Filter Documentation |
Configuration Example
txt
# Set request encoding, request header `content-type` Empty fields are changed to `; charset=utf8`
www.example.com/path reqCharset://utf8
# Set the request encoding. The empty `content-type` request header field is changed to `text/html; charset=utf8`
www.example.com/path resType://json reqCharset://utf8Associated Protocols
- Directly modify the request header: reqHeaders://content-type=xxx
- Modify the request content encoding: reqType://media-type