Parameters
See plugin common configurations for configuration options available to all plugins.
request
Request body transformation configuration.
input_format
vaild vaule:
xml,json,encoded,args,plain, ormultipartRequest body original media type. If unspecified, the value would be determined by the
Content-Typeheader to apply the corresponding decoder.The
xmloption corresponds totext/xmlmedia type. Thejsonoption corresponds toapplication/jsonmedia type. Theencodedoption corresponds toapplication/x-www-form-urlencodedmedia type. Theargsoption corresponds to GET requests. Theplainoption corresponds totext/plainmedia type. Themultipartoption corresponds tomultipart/form-datamedia type.If the media type is not one of the supported types, the value would be left unset and the transformation template will be directly applied.
template
Request body transformation template. The template uses lua-resty-template syntax. See the template syntax for more details.
You can also use auxiliary functions
_escape_json()and_escape_xml()to escape special characters such as double quotes,_bodyto access request body, and_ctxto access context variables. See examples to learn more.template_is_base64
Set to true if the template is base64 encoded.
response
Response body transformation configuration.
input_format
vaild vaule:
xml,json,encoded,args,plain, ormultipartResponse body original media type. If unspecified, the value would be determined by the
Content-Typeheader to apply the corresponding decoder.The
xmloption corresponds totext/xmlmedia type. Thejsonoption corresponds toapplication/jsonmedia type. Theencodedoption corresponds toapplication/x-www-form-urlencodedmedia type. Theargsoption is primarily used for request query arguments and is typically not applicable to response bodies. Theplainoption corresponds totext/plainmedia type. Themultipartoption corresponds tomultipart/form-datamedia type.If the media type is none of the supported types, the value would be left unset and the transformation template will be directly applied.
template
Response body transformation template.
template_is_base64
Set to true if the template is base64 encoded.
max_req_body_size
Maximum request body size in bytes buffered into memory. Larger request bodies are rejected. Available in API7 Enterprise from version 3.9.17 on the 3.9 line and from version 3.10.4 on the 3.10 line.
max_resp_body_size
Maximum response body size in bytes buffered into memory. Larger responses are truncated. Available in API7 Enterprise from version 3.9.17 on the 3.9 line and from version 3.10.4 on the 3.10 line.