# Http request adds codes to the string

**URL:** <https://discourse.nodered.org/t/http-request-adds-codes-to-the-string/37681>\
**Category:** General\
**Created:** [17 December 2020 21:43 UTC](https://discourse.nodered.org/t/http-request-adds-codes-to-the-string/37681 "2020-12-17T21:43:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ianlyonthomas](https://avatars.discourse-cdn.com/v4/letter/i/a183cd/32.png) [@ianlyonthomas](https://discourse.nodered.org/u/ianlyonthomas)\
**Post date:** [17 December 2020 21:43 UTC](https://discourse.nodered.org/t/http-request-adds-codes-to-the-string/37681/1 "2020-12-17T21:43:13Z")

</div>

I have a http GET to which I pass the string -  
{"Lat=":gpslat,"Lon=":gpslon,"Date=":gpsdate,"Time=":0,"Device=":name,"timer=":gpsdate,"speed=":gpsspeed,"heading=":gpscourse,"&distance=":0};

However the string that arrive at the server is -  
Lat%3D=51.74922783&Lon%3D=-0.96561783&Date%3D=&Time%3D=0&Device%3D=521&timer%3D=&speed%3D=0.021&heading%3D=0&%26distance%3D=0

The PHP on the server is failing to process the received string and setting the Insert values to ""

Is there any way to format the output from http request as just text?

Ian

---

<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:** [17 December 2020 22:16 UTC](https://discourse.nodered.org/t/http-request-adds-codes-to-the-string/37681/2 "2020-12-17T22:16:33Z")

</div>

Change the object you pass the HTTP Get node to be:

```auto
{ "Lat":gpslat, "Lon":gpslon, "Date":gpsdate, "Time":0, "Device":name, "timer":gpsdate, "speed":gpsspeed, "heading":gpscourse, "distance":0 }

```

The node will automatically convert that to the appropriately formatted query parameters for you.

---

<div class="post-metadata">

**Author:** ![ianlyonthomas](https://avatars.discourse-cdn.com/v4/letter/i/a183cd/32.png) [@ianlyonthomas](https://discourse.nodered.org/u/ianlyonthomas)\
**Post date:** [18 December 2020 19:04 UTC](https://discourse.nodered.org/t/http-request-adds-codes-to-the-string/37681/3 "2020-12-18T19:04:08Z")

</div>

Thanks @knolleary,

Worked a treat.

Ian

---

<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:** [16 February 2021 19:04 UTC](https://discourse.nodered.org/t/http-request-adds-codes-to-the-string/37681/4 "2021-02-16T19:04:10Z")

</div>

Closed on 16 February 2021 19:04 UTC

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