# Request Transformer: http\_method + add.body

**URL:** <https://discuss.konghq.com/t/request-transformer-http-method-add-body/796>\
**Category:** Questions\
**Created:** [April 9, 2018, 7:11pm UTC](https://discuss.konghq.com/t/request-transformer-http-method-add-body/796 "2018-04-09T19:11:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PFadel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/pfadel/32/279_2.png) [@PFadel](https://discuss.konghq.com/u/PFadel)\
**Post date:** [April 9, 2018, 7:11pm UTC](https://discuss.konghq.com/t/request-transformer-http-method-add-body/796/1 "2018-04-09T19:11:50Z")

</div>

Hello everyone.

I’m using kong community with the Request Transformer plugin. I want to transform a GET in Kong into a POST in my API. As a test, I’m using an Echo API that just returns the payload received. For the plugin configuration I used these values:

`curl -X POST http://localhost:8001/apis/1ce6ba82-f8f6-4f0a-a8f3-187051a2b663/plugins \ --data "name=request-transformer" \ --data "config.http_method=post" \ --data "config.add.body=echo:echo"`

The plugin is created accordingly, as GET in /plugins returns.

`{ "created_at": 1523300420000, "config": { "remove": { "querystring": {}, "headers": {}, "body": {} }, "add": { "querystring": {}, "headers": {}, "body": ["echo:echo"] }, "http_method": "post", "append": { "querystring": {}, "headers": {}, "body": {} }, "replace": { "querystring": {}, "headers": {}, "body": {} }, "rename": { "querystring": {}, "headers": {}, "body": {} } }, "id": "41110bf3-e82e-415f-8a4b-7e393a0403fa", "name": "request-transformer", "api_id": "1ce6ba82-f8f6-4f0a-a8f3-187051a2b663", "enabled": true }`

Although, my GET only return null. Is there something wrong ? Can’t I add a body since GET doesn’t have a payload ?

Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![Peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@Peter](https://discuss.konghq.com/u/Peter)\
**Post date:** [February 21, 2019, 7:09am UTC](https://discuss.konghq.com/t/request-transformer-http-method-add-body/796/2 "2019-02-21T07:09:14Z")

</div>

Hi PFadel，have you solved this problem?

---

<div class="post-metadata">

**Author:** ![NoKnow](https://avatars.discourse-cdn.com/v4/letter/n/94ad74/32.png) [@NoKnow](https://discuss.konghq.com/u/NoKnow)\
**Post date:** [October 22, 2019, 9:37am UTC](https://discuss.konghq.com/t/request-transformer-http-method-add-body/796/3 "2019-10-22T09:37:57Z")

</div>

Hi,  
I had the same issue trying to redirect a GET to a POST resulting in null bodies.  
figured out, if I set the header to `Content-Type:application/json` it works.  
Guess there were some checks on the Content-Type inside the transformer concerning body if I recall that correctly.

Hope it helps

(though, nested body is still a struggle)
