# Request working in x-www-form-urlencoded but not in raw

**URL:** <https://community.postman.com/t/request-working-in-x-www-form-urlencoded-but-not-in-raw/45364>\
**Category:** Help Hub\
**Tags:** raw, body\
**Created:** [March 20, 2023, 2:28pm UTC](https://community.postman.com/t/request-working-in-x-www-form-urlencoded-but-not-in-raw/45364 "2023-03-20T14:28:48Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![nielf](https://avatars.discourse-cdn.com/v4/letter/n/13edae/32.png) [@nielf](https://community.postman.com/u/nielf)\
**Post date:** [March 20, 2023, 2:28pm UTC](https://community.postman.com/t/request-working-in-x-www-form-urlencoded-but-not-in-raw/45364/1 "2023-03-20T14:28:48Z")

</div>

Hi,

I am testing the eFront API, specifically the [Add User to Curriculum]([https://app.swaggerhub.com/apis/Epignosis/Efront-API/1.0.0#/Curriculum/p](https://app.swaggerhub.com/apis/Epignosis/Efront-API/1.0.0#/Curriculum/p)  
I can use other ut\_Curriculum\_\_Id\_\_AddUser).

When I am using x-www-form-urlencoded in Postman, my request is successful.

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/0/5/05a49a536bb16f08ac71e07c1fa44d57ff012dea.png)

However, when I change the body to raw it is not working:

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/1/8/18a3c0ede460474b84ad882286e84f7e8465b61c.png)

Am I doing something wrong or missing something?

I am using the API with the raw format to [create a new user](https://app.swaggerhub.com/apis/Epignosis/Efront-API/1.0.0#/User/post_User) where it works as expected (screenshot from Power Automate).

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/c/1/c16c9b0752461ad8cd6c2025d02660a74936af91.png)

---

<div class="post-metadata">

**Author:** ![w4dd325](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/w4dd325/32/12436_2.png) [@w4dd325](https://community.postman.com/u/w4dd325)\
**Post date:** [March 20, 2023, 7:18pm UTC](https://community.postman.com/t/request-working-in-x-www-form-urlencoded-but-not-in-raw/45364/3 "2023-03-20T19:18:34Z")

</div>

Hi @nielf

It looks like you are hitting two separate end-points… a PUT and a POST.

A quick glance over the Swagger docs looks like the PUT’s only accept x-www-form-urlencoded body’s  
 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/0/8/08b005d529cdea7e1c1076971b65b429eab56166.png)

Where as the POST’s appear to accept both that and application/json body’s

![image](https://us1.discourse-cdn.com/getpostman/original/3X/1/a/1af25988df56933c144714edccf22a31af1fc1c8.png)

---

<div class="post-metadata">

**Author:** ![nielf](https://avatars.discourse-cdn.com/v4/letter/n/13edae/32.png) [@nielf](https://community.postman.com/u/nielf)\
**Post date:** [March 21, 2023, 7:46am UTC](https://community.postman.com/t/request-working-in-x-www-form-urlencoded-but-not-in-raw/45364/4 "2023-03-21T07:46:49Z")

</div>

I see. Thanks for the input @w4dd325

However, I am still struggling with the part where I have to ender the _UserId_ in the body.

I have added a header with key: Content-type and Value: application/x-www.form-urlencoded

Then I have tried this in the body:

UserId=35

userid=35

{  
“UserId”: 35  
}

also tried adding it as a parameter in the URL:

![image](https://us1.discourse-cdn.com/getpostman/original/3X/b/7/b760174f4b84ef6f26599bf01e77e00abf8c3f2d.png)

My end goal is to use it in a Power Automate action, where I cannot enter Key/Value pairs directly, as I can in postman.

---

<div class="post-metadata">

**Author:** ![w4dd325](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/w4dd325/32/12436_2.png) [@w4dd325](https://community.postman.com/u/w4dd325)\
**Post date:** [March 21, 2023, 12:58pm UTC](https://community.postman.com/t/request-working-in-x-www-form-urlencoded-but-not-in-raw/45364/5 "2023-03-21T12:58:35Z")

</div>

Looks like you need to pass an ‘id’ param…

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/b/2/b21b04a8c18b821bfca540b5e34d46f738402bc1.png)

I see you have ‘13’ hardcoded, add it as a param and ensure that the number is correct.

---

<div class="post-metadata">

**Author:** ![nielf](https://avatars.discourse-cdn.com/v4/letter/n/13edae/32.png) [@nielf](https://community.postman.com/u/nielf)\
**Post date:** [March 21, 2023, 1:12pm UTC](https://community.postman.com/t/request-working-in-x-www-form-urlencoded-but-not-in-raw/45364/6 "2023-03-21T13:12:52Z")

</div>

@w4dd325 the ID I have hardcoded is the Curriculum ID.

What I am struggling with is how to add the UserID in the body.

---

<div class="post-metadata">

**Author:** ![w4dd325](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/w4dd325/32/12436_2.png) [@w4dd325](https://community.postman.com/u/w4dd325)\
**Post date:** [March 21, 2023, 5:06pm UTC](https://community.postman.com/t/request-working-in-x-www-form-urlencoded-but-not-in-raw/45364/7 "2023-03-21T17:06:59Z")

</div>

When you import the cURL command from Swagger into Postman, it looks like this:

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/4/4/444e22d7b54036235aef71c556db6d6f98b0bdbd.png)

You can grab the cURL like this:

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/7/b/7ba51693a8e2c20e092efe1f0befdfeb1e4ce3ca.png)

And then just import it directly into Postman and it will configure the call for you.

---

<div class="post-metadata">

**Author:** ![nielf](https://avatars.discourse-cdn.com/v4/letter/n/13edae/32.png) [@nielf](https://community.postman.com/u/nielf)\
**Post date:** [March 22, 2023, 7:59am UTC](https://community.postman.com/t/request-working-in-x-www-form-urlencoded-but-not-in-raw/45364/8 "2023-03-22T07:59:22Z")

</div>

> [@w4dd325](#):
>
> You can grab the cURL like this:

It works fine for me in Postman.

However, the issue is, that I need to convert that into something I can use in an HTTP action Power Automate.

Here I can’t enter the Key/Value pairs as I can in Postman.

![image](https://us1.discourse-cdn.com/getpostman/original/3X/8/f/8f03ca2d2230cda210577b659ab3bfff9e0f8735.png)

---

<div class="post-metadata">

**Author:** ![w4dd325](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/w4dd325/32/12436_2.png) [@w4dd325](https://community.postman.com/u/w4dd325)\
**Post date:** [March 22, 2023, 8:21am UTC](https://community.postman.com/t/request-working-in-x-www-form-urlencoded-but-not-in-raw/45364/9 "2023-03-22T08:21:36Z")

</div>

Looks like you need to copy out the multi-part form data, try this article:

> **[Using Multipart/Form-Data in a Power Automate or Logic Apps HTTP Action](https://clavinfernandes.wordpress.com/2022/04/18/use-multipart-form-data-in-power-automate-or-logic-apps-http-action/)**
>
> In HTTP terms, Content-Type ‘header’ is used by the client application when it submits data to the server.  That being said, one of the most used Content-Types is ‘Multipart/…

---

<div class="post-metadata">

**Author:** ![nielf](https://avatars.discourse-cdn.com/v4/letter/n/13edae/32.png) [@nielf](https://community.postman.com/u/nielf)\
**Post date:** [March 24, 2023, 6:59am UTC](https://community.postman.com/t/request-working-in-x-www-form-urlencoded-but-not-in-raw/45364/10 "2023-03-24T06:59:26Z")

</div>

Thanks for the link, @w4dd325.

I’ll see if I can use that approach.

---

<div class="post-metadata">

**Author:** ![nielf](https://avatars.discourse-cdn.com/v4/letter/n/13edae/32.png) [@nielf](https://community.postman.com/u/nielf)\
**Post date:** [March 28, 2023, 7:37am UTC](https://community.postman.com/t/request-working-in-x-www-form-urlencoded-but-not-in-raw/45364/11 "2023-03-28T07:37:53Z")

</div>

I finally found a solution that works.

It is described in the second part of [this blog.](https://ashiqf.com/2021/07/25/how-to-use-form-data-and-form-urlencoded-content-type-in-power-automate-or-logic-apps-http-action/comment-page-1/#comment-6302)
