I noticed that if a request has an empty body, the body transform is ignored.
For example, to make it works with a post request the body must be at least {}.
Does that means the body transform can’t work together with a method transform from GET to POST?
For example in this api definition:
"extended_paths": {
"transform": [
{
"template_data": {
"input_type": "json",
"template_mode": "blob",
"enable_session": false,
"template_source": "ewogICJGb28iOiAiYmFyIgp9"
},
"path": "foo",
"method": "POST"
},
{
"template_data": {
"input_type": "json",
"template_mode": "blob",
"enable_session": false,
"template_source": "ewogICJGb28iOiAiYmFyIgp9"
},
"path": "foo",
"method": "GET"
}
],
"method_transforms": [
{
"path": "foo",
"method": "GET",
"to_method": "POST"
}
]
},
the template content is:
{
"foo": "{{._tyk_context.request_data.foo}}"
}
It works on the POST request if I include at least an empty body object but it’s ignored in the GET request (with both having a foo=bar query).
The same happens with any other template, even with a very simple:
{
"foo": "bar"
}