docs/en/docs/rules/reqCharset.md
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>
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 |
# 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://utf8