Hello, I’m trying to transform a GET request (without a body) into a POST request with a body. I’m setting up the request using the endpoint designer.
I’ve added a GET request with the path “graphql” (I’ll be adding a URL rewrite later)
To this endpoint, I’ve added a method transform to change the method into a POST request.
I’ve also added a body transform:
{"query":"{\n currentMember {\n lastName\n }\n}","variables":{}}
However, the body is not added unless the original GET request includes a body. I do not want the original get request to include a body. So, how can I transform a GET request (without a body) into a POST request with a body?
Here is the raw transform definition:
{
"transform": [
{
"disabled": false,
"template_data": {
"input_type": "json",
"template_mode": "blob",
"enable_session": false,
"template_source": "eyJxdWVyeSI6IntcbiAgY3VycmVudE1lbWJlciB7XG4gICAgbGFzdE5hbWVcbiAgfVxufSIsInZhcmlhYmxlcyI6e319",
"input": "",
"output": ""
},
"path": "graphql",
"method": "GET"
}
]
I’m using Tyk 4.2.3