# Retrieving data from a server via an https link

**URL:** https://discourse.nodered.org/t/retrieving-data-from-a-server-via-an-https-link/63847
**Category:** General
**Tags:** http-request
**Created:** [13 June 2022 08:26 UTC](https://discourse.nodered.org/t/retrieving-data-from-a-server-via-an-https-link/63847 "2022-06-13T08:26:50Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Geoffrey](https://avatars.discourse-cdn.com/v4/letter/g/bc8723/32.png) [@Geoffrey](https://discourse.nodered.org/u/Geoffrey)
#### Post date: [13 June 2022 08:26 UTC](https://discourse.nodered.org/t/retrieving-data-from-a-server-via-an-https-link/63847/1 "2022-06-13T08:26:50Z")

</div>

Hello,

I would like to know how to retrieve data from a server and send it to Node-Red. I previously tested the URL on Postman, to see the data sent:

 ![Recuperation_donne_https_PostMan](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/c/dcf75aecf05c2e7f38f3f60a4e4b0cceeaa9055e.png)

In order to get the correct values ​​I had to add headers.

I would like to retrieve the values ​​in this same form but on Node-Red

I have previously tested something, like this helper:  
[https://cookbook.nodered.org/http/set-request-header](https://cookbook.nodered.org/http/set-request-header)

Doing it on Node-Red gave me this:

 ![Recuperation_donne_https](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/4/040ddc3ee456b9f532b1a1952c0145d155d6db97.png)

Code located in the function block.

 ![Recuperation_donne_https_code](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/4/54b76ce0bd9cebc069221cc4914fcb3609583dbf.png)  
 ![Recuperation_donne_https_GET](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/c/2c6ef2189a8cfd385baa8425bfcc6d26927af712.png)

Result obtained, I do not know how to interpret.

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

Thank you for your answers.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [13 June 2022 14:56 UTC](https://discourse.nodered.org/t/retrieving-data-from-a-server-via-an-https-link/63847/2 "2022-06-13T14:56:22Z")

</div>

Well it looks more like a binary file - which given the accept-encoding says gzip deflate then maybe needs to be unzipped. Maybe it will allow a different encoding ?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [13 June 2022 15:27 UTC](https://discourse.nodered.org/t/retrieving-data-from-a-server-via-an-https-link/63847/3 "2022-06-13T15:27:26Z")

</div>

Additionally, try "application/json" for the "Accept" header.

---

<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: [12 August 2022 15:28 UTC](https://discourse.nodered.org/t/retrieving-data-from-a-server-via-an-https-link/63847/4 "2022-08-12T15:28:05Z")

</div>

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