Input Form data transformation to Json

I have an API which accepts Form data in request. I am trying to covert this to Json before sending the request to an upstream API.

I tried below configuration in API Definition -

            - method: POST
              path: /anything
                enable_session: true
                #input_type: json
                template_mode: blob
                # base64 encoded template
                template_source: base64EncodedTemplate

When I send a Form data I am getting below error in logs -

error="unsupported request input type:

What will be the input type when incoming request is in application/x-www-form-urlencoded format?

I have referred this documentation.


The body transforms currently only work with application/xml or application/json content.

You could use a virtual endpoint or other types of plugins to do this transform.