# HTTP-Request reports "invalid payload"?

**URL:** https://discourse.nodered.org/t/http-request-reports-invalid-payload/23168
**Category:** General
**Created:** [16 March 2020 11:13 UTC](https://discourse.nodered.org/t/http-request-reports-invalid-payload/23168 "2020-03-16T11:13:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Gawan](https://avatars.discourse-cdn.com/v4/letter/g/e9c0ed/32.png) [@Gawan](https://discourse.nodered.org/u/Gawan)
#### Post date: [16 March 2020 11:13 UTC](https://discourse.nodered.org/t/http-request-reports-invalid-payload/23168/1 "2020-03-16T11:13:12Z")

</div>

Hi,  
I pass the following payload from a function node to my http-request node:

msg.payload = "&value=100&format=json";

The setup looks like this:

 ![16-03-_2020_12-11-37](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/a/ca6469f0d1202ce6c94a7322708d205a86375569.png)

Unfortunately I get an "invalid payload" error as you can see in the debugging tab.

Any idea why ?

BR  
G

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [16 March 2020 11:32 UTC](https://discourse.nodered.org/t/http-request-reports-invalid-payload/23168/2 "2020-03-16T11:32:00Z")

</div>

Hi,

the 'append msg.payload as qs params' assumes that msg.payload will be an object of key/value pairs that it will convert to a query string for you.

So if you use:

```auto
msg.payload = {
   value: 100,
   format: "json"
}

```

it will then do the right thing.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [15 May 2020 11:32 UTC](https://discourse.nodered.org/t/http-request-reports-invalid-payload/23168/3 "2020-05-15T11:32:03Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
