# Unreadable string from http request node

**URL:** <https://discourse.nodered.org/t/unreadable-string-from-http-request-node/79727>\
**Category:** General\
**Created:** [11 July 2023 07:49 UTC](https://discourse.nodered.org/t/unreadable-string-from-http-request-node/79727 "2023-07-11T07:49:44Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![k5map](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/k5map/32/47681_2.png) [@k5map](https://discourse.nodered.org/u/k5map)\
**Post date:** [11 July 2023 07:49 UTC](https://discourse.nodered.org/t/unreadable-string-from-http-request-node/79727/1 "2023-07-11T07:49:44Z")

</div>

I'm using the "http request" node and this URL: [https://api.v2.sondehub.org/amateur/telemetry?duration=3d&payload\_callsign=k5wh-117](https://api.v2.sondehub.org/amateur/telemetry?duration=3d&payload_callsign=k5wh-117)

If I put this in my browser, I get what I expected which is a json structure. But what comes out of the http request node is this:  
�h �d�՝m�\�qF�ʀj���/@r۱, &aaa#�c�V&)�����w7��]r�ְ]E�4;6{�\>�����G��?��#������G��\>J�T�����}J�O�������/^\_~��ū��ʣ�W�\<���w������?��7Ow��x{���������|����7���Oߧ�G^��ݷ/�.�\_���닗/߼���[�(���w�O��x���g���7\_���~�����޾xu���˯/_�����a�v�{(�J�O�~X��;��?���y���~Ԙ��$����x��ż��'/?:�#�\>1H�ϋ��;kkm\_��� �O��z���姏Zi���Ow��9���Ϟ-��}��O~��ݧ�/�~�f��\>��v�+������ݿ\_��x���-o��Җ��������ߖ�����=�8n a&أ|�qJ-��/��C�x��'��� ��aw���7\_��Z��e��ؖ�_]=��������^�yq��=3=f�6Ao�;���w�����������\>������H��l�e��7�|k�s�S��k)��e��9:�`��v6�I�vmW��=U�cp��ORDm���b�f���8�6j��i���-�-&؇�������&�s�M^醘چ��K��m#��\۬�&k�݂S�p�6v?�d;��E��\m�W�1����.̚��nt����'k;�;���횅J��m�v��޷�G�n���~��	���a�j��P�a#�3$D+�73�ꪂ�`\*��-�1#�:MEJրM�#H�q=9�4�`ǌ 4����+٤� z]�6pZ�a}7���k���I�:�v�9f��^DD0[}��kUٱ2L��b3��a�l�����u�b}b�  
�����dߛCL��v� 2�� �5��� ��8�� Bn���ƾn�(l�Z�e[Ws���f�h�4�h�-!+ڮ��+6�\c�S�ۓ���0���dN���[3�kU�������/�%&֣�޿�V��a��#{r)~�n1�\>\<:&a���:�T�s�Hu�5�"0ְ[iM�X�� ��86�eD�\_�c�z�����d+...

I've set the http node with UTF-8 and JSON object with the same result. Anyone have an idea why I'm not getting the same json string in msg.payload from the node?

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [11 July 2023 08:53 UTC](https://discourse.nodered.org/t/unreadable-string-from-http-request-node/79727/2 "2023-07-11T08:53:25Z")

</div>

Looks like the payload is compressed, if you look at header it probably say content encoding: gzip This node should uncompress

> **[node-red-contrib-gzip](https://flows.nodered.org/node/node-red-contrib-gzip)**
>
> gzip compress or decompress, using pako

More info if you [search forum](https://discourse.nodered.org/search?q=gzip)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [11 July 2023 09:58 UTC](https://discourse.nodered.org/t/unreadable-string-from-http-request-node/79727/3 "2023-07-11T09:58:11Z")

</div>

Along with the `gzip` node, you will need a `json` node and need to set the `http-in` node to return a `binary buffer`

```auto
[{"id":"f4cdc36052e3c33d","type":"tab","label":"Flow 6","disabled":false,"info":"","env":[]},{"id":"56ea0cc5f99b3989","type":"http request","z":"f4cdc36052e3c33d","name":"","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://api.v2.sondehub.org/amateur/telemetry?duration=3d&payload_callsign=k5wh-117","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":290,"y":140,"wires":[["4164501163f59261"]]},{"id":"56a3352cf019c558","type":"inject","z":"f4cdc36052e3c33d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":140,"wires":[["56ea0cc5f99b3989"]]},{"id":"a4b22404e00c8b26","type":"debug","z":"f4cdc36052e3c33d","name":"debug 15","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":760,"y":140,"wires":[]},{"id":"4164501163f59261","type":"gzip","z":"f4cdc36052e3c33d","name":"","x":450,"y":140,"wires":[["fd5bf2d76994e9c1"]]},{"id":"fd5bf2d76994e9c1","type":"json","z":"f4cdc36052e3c33d","name":"","property":"payload","action":"","pretty":false,"x":610,"y":140,"wires":[["a4b22404e00c8b26"]]}]

```

---

<div class="post-metadata">

**Author:** ![k5map](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/k5map/32/47681_2.png) [@k5map](https://discourse.nodered.org/u/k5map)\
**Post date:** [12 July 2023 01:23 UTC](https://discourse.nodered.org/t/unreadable-string-from-http-request-node/79727/5 "2023-07-12T01:23:41Z")

</div>

Ok so I changed the http node to output binary; I added the gzip node as well as the json so here is my flow:

 ![Capture1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/e/ee7ac78f95f18aa78f09733ce59a6272fe58f958.png)

The result now is the output from the http node in payload looks like an array but the output from the gzip node is payload = {}. Did I miss something in the setup?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [12 July 2023 07:36 UTC](https://discourse.nodered.org/t/unreadable-string-from-http-request-node/79727/6 "2023-07-12T07:36:11Z")

</div>

Did you import and test the flow I provided?

Can you provide your flow?

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [12 July 2023 08:16 UTC](https://discourse.nodered.org/t/unreadable-string-from-http-request-node/79727/7 "2023-07-12T08:16:36Z")

</div>

Yes that seems to be correct, the call sign is returning nothing . If i change it to `York-test` it returns

```auto
{"York-test": {"2023-07-09T13:51:25.000Z": {"software_name": "LoRa Gateway", "software_version": "V1.10.0", "uploader_callsign": "2E0CRV", "time_received": "2023-07-09T13:51:27Z", "payload_callsign": "York-test", "datetime": "2023-07-09T13:51:25Z", "lat": 54.00165, "lon": -1.06156, "alt": 21, "frequency": 434.2765, "modulation": "LoRa Mode 1", "snr": 6, "rssi": -57, "raw": "$$York-test,114,13:51:25,54.00165,-1.06156,00021,12,43.3,0.0,0*9892", "uploader_position": "54.0,-1.06",...........

```

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [12 July 2023 09:29 UTC](https://discourse.nodered.org/t/unreadable-string-from-http-request-node/79727/8 "2023-07-12T09:29:41Z")

</div>

Interesting, yesterday my example flow worked and today it returns nothing. But the link in the original post also returns nothing so my guess is that call sign (k5wh-117) is not currently active.

---

<div class="post-metadata">

**Author:** ![k5map](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/k5map/32/47681_2.png) [@k5map](https://discourse.nodered.org/u/k5map)\
**Post date:** [12 July 2023 22:12 UTC](https://discourse.nodered.org/t/unreadable-string-from-http-request-node/79727/9 "2023-07-12T22:12:45Z")

</div>

@zenofmud ... Paul what is also confusing is call K5WH-117 has been active off/on over the past 2 weeks. The URL is requesting all location data for the past 3 days. If you go to the SondeHub API website and use their site to execute the same URL, it will return several data points.

I used the York-test call and received data so the flow is definitely working. At this point, I believe the issue is with the SondeHub API website. Much thanks to both of you for your assistance.

---

<div class="post-metadata">

**Author:** ![k5map](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/k5map/32/47681_2.png) [@k5map](https://discourse.nodered.org/u/k5map)\
**Post date:** [12 July 2023 22:23 UTC](https://discourse.nodered.org/t/unreadable-string-from-http-request-node/79727/10 "2023-07-12T22:23:43Z")

</div>

Ok the problem is definitely the SondeHub website... two days ago, I could get sample data using the API website. Today the same request is return no data.

---

<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:** [10 September 2023 22:24 UTC](https://discourse.nodered.org/t/unreadable-string-from-http-request-node/79727/11 "2023-09-10T22:24:14Z")

</div>

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