Skip to content

reqCharset

Modify the charset portion of the content-type request header to set the encoding of the request content.

content-type structure:

txt
<media-type>; charset=<encoding>

Rule Syntax

txt
pattern reqCharset://encoding [filters...]
ParametersDescriptionDetailed Documentation
patternExpression to match against the request URLMatch Pattern Documentation
encodingEncoding name, such as utf8
• Inline/Embedded/Values content
⚠️ Loading data from files/remote URLs is not supported
filtersOptional 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://utf8

Associated Protocols

  1. Directly modify the request header: reqHeaders://content-type=xxx
  2. Modify the request content encoding: reqType://media-type