# \[Solved\] Web API POST with "x-www-form-urlencoded" Body

**URL:** <https://community.thunkable.com/t/solved-web-api-post-with-x-www-form-urlencoded-body/385932>\
**Category:** Questions about Thunkable X\
**Tags:** solved, webapi\
**Created:** [December 30, 2019, 8:06am UTC](https://community.thunkable.com/t/solved-web-api-post-with-x-www-form-urlencoded-body/385932 "2019-12-30T08:06:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [December 30, 2019, 8:06am UTC](https://community.thunkable.com/t/solved-web-api-post-with-x-www-form-urlencoded-body/385932/1 "2019-12-30T08:06:16Z")

</div>

Hi,

I am dealing with an API, which requires data to be sent in “x-www-form-urlencoded” type BODY. I could not find a way to send BODY data in “x-www-form-urlencoded” form.

If you have heard of Postman API Platform, where you can send test requests to API, I have sent BODY data in “x-www-form-urlencoded” form from it. The response successfully comes, and everything is good in Postman. Here’s the screenshot of Postman BODY area -

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/c/4ceb10643b3249e6c2a2b93d72aa6033ac57265b.png)

If you could suggest any way to send data in BODY with “x-www-form-urlencoded” form in Thunkable X, it would be helpful.

Thanks! 😊

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [December 30, 2019, 9:39am UTC](https://community.thunkable.com/t/solved-web-api-post-with-x-www-form-urlencoded-body/385932/2 "2019-12-30T09:39:57Z")

</div>

Hi,

see scrWebAPI

[https://x.thunkable.com/projects/5d70f93f8a62b4079eedaff2/project/properties/designer/](https://x.thunkable.com/projects/5d70f93f8a62b4079eedaff2/project/properties/designer/)

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [December 30, 2019, 10:54am UTC](https://community.thunkable.com/t/solved-web-api-post-with-x-www-form-urlencoded-body/385932/3 "2019-12-30T10:54:26Z")

</div>

Hi, @actech! 👋  
Thanks a lot for your reply! 😊

I think you misunderstood my question 😅

Your blocks set the body to just “x-www-form-urlencoded”.

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/f/9f473ec1300b9aacbb33ecccf2d316941d6ed134.png)

What I want is, set BODY to “x-www-form-urlencoded” type of data. Here’s a description of what’s “x-www-form-urlencoded” - [click here](https://www.google.com/search?rlz=1C1CHBF_enIN870IN870&sxsrf=ACYBGNSnWQpEctgjcSC9P0hCujCsz4OUJA%3A1577702633736&ei=6dQJXsXOLPib4-EPr5Wx8Ak&q=post+body+x-www-form-urlencoded&oq=POST+x-www-form-urlencoded+&gs_l=psy-ab.3.0.0i7i30l10.1428.5424..6870...0.2..0.257.1430.2-6......0....1..gws-wiz.......0i71j35i39j0i67j0j0i20i263.djO_D3aFIDw)

Thunkable X only has the option of setting BODY to a text string.

Thanks! 😊

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [December 30, 2019, 2:21pm UTC](https://community.thunkable.com/t/solved-web-api-post-with-x-www-form-urlencoded-body/385932/4 "2019-12-30T14:21:58Z")

</div>

Try to indicate this type in the header, for example, xmlhttp.setRequestHeader (**‘Content-Type’, ‘application/x-www-form-urlencoded’)**;

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [December 31, 2019, 8:28am UTC](https://community.thunkable.com/t/solved-web-api-post-with-x-www-form-urlencoded-body/385932/5 "2019-12-31T08:28:21Z")

</div>

### Thank you so much @actech! 🎉

Your Solution worked perfectly 👍 👍  
TBH, before your solution came, I spent my whole day searching how to set BODY 😅

Thanks a lot! 😊

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:46am UTC](https://community.thunkable.com/t/solved-web-api-post-with-x-www-form-urlencoded-body/385932/6 "2024-11-08T11:46:12Z")

</div>


