XML to JSON template conversion not working

I made it work for this SOAP API, and in the process found a bug: Tyk can’t properly transform body if server use compression and client passed Accept-Encoding header. Go HTTP usually automatically handle response compression, except the case when the client specifies Accept-Encoding header, and Postman in this case does. So when I disabled this header in postman by setting it empty, it started working. Here is how my postman call looks:

Regarding Tyk setup, it was quite simple, API base url XML Tutorial, and POST tempconvert.asmx path, and body transform mentioned above:

{
"FahrenheitToCelsiusResponse": "{{index . "Envelope" "Body" "FahrenheitToCelsiusResponse" "FahrenheitToCelsiusResult"}}"
}
1 Like