# Http request - Use SSL/TLS Connection

**URL:** <https://discourse.nodered.org/t/http-request-use-ssl-tls-connection/37713>\
**Category:** General\
**Created:** [18 December 2020 16:37 UTC](https://discourse.nodered.org/t/http-request-use-ssl-tls-connection/37713 "2020-12-18T16:37:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cdacruz](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cdacruz/32/29482_2.png) [@cdacruz](https://discourse.nodered.org/u/cdacruz)\
**Post date:** [18 December 2020 16:37 UTC](https://discourse.nodered.org/t/http-request-use-ssl-tls-connection/37713/1 "2020-12-18T16:37:36Z")

</div>

Hi all,

I'm trying to do a simple get request. The base url is : [https://geodes.santepubliquefrance.fr/GC\_indic.php?lang=fr&prodhash=123456789&indic=tx\_pe\_gliss&dataset=sp\_ti\_tp\_7j&view=map2&filters=semaine\_glissante=2020-11-30-2020-12-18](https://geodes.santepubliquefrance.fr/GC_indic.php?lang=fr&prodhash=123456789&indic=tx_pe_gliss&dataset=sp_ti_tp_7j&view=map2&filters=semaine_glissante=2020-11-30-2020-12-18).

This should give you back a json file. When you call this url through the browser or postman it work properly, but through the http-request node I got something ununderstandable.

I think I need to enable and specify the secure (SSL/TLS) connection. I don't know how to do that.  
Does anyone have a tutorial for that ? How to build the files ?

Thanks a lot.

.Christian

`[{"id":"cb7b703.2f2289","type":"http request","z":"601312ef.b153fc","name":"Build & Do Request","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://geodes.santepubliquefrance.fr/GC_indic.php?lang=fr&prodhash={{{random}}}&indic=tx_pe_gliss&dataset=sp_ti_tp_7j&view=map2&filters=semaine_glissante=2020-11-30-{{{date}}}","tls":"","persist":false,"proxy":"","authType":"","x":530,"y":1060,"wires":[["a8fcfd0f.7c808"]]},{"id":"b6237e30.7c5e5","type":"moment","z":"601312ef.b153fc","name":"Date today","topic":"","input":"","inputType":"date","inTz":"Europe/Paris","adjAmount":"0","adjType":"days","adjDir":"subtract","format":"YYYY-MM-DD","locale":"fr_FR","output":"date","outputType":"msg","outTz":"Europe/Paris","x":350,"y":1060,"wires":[["cb7b703.2f2289"]]},{"id":"a8fcfd0f.7c808","type":"debug","z":"601312ef.b153fc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":690,"y":1060,"wires":[]},{"id":"e2d78d08.3c68e","type":"inject","z":"601312ef.b153fc","name":"Trigger Manual","props":[{"p":"payload"},{"p":"random","v":"","vt":"date"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":1060,"wires":[["b6237e30.7c5e5"]]}]`

---

<div class="post-metadata">

**Author:** ![Tombcat](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tombcat/32/33861_2.png) [@Tombcat](https://discourse.nodered.org/u/Tombcat)\
**Post date:** [18 December 2020 17:43 UTC](https://discourse.nodered.org/t/http-request-use-ssl-tls-connection/37713/2 "2020-12-18T17:43:38Z")

</div>

It seems that you need to expose your node-red to the internet.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [18 December 2020 21:03 UTC](https://discourse.nodered.org/t/http-request-use-ssl-tls-connection/37713/3 "2020-12-18T21:03:14Z")

</div>

I don't think it is an ssl issue. I can't run your flow as it requires a non-core node that I do not have installed. If you configured an inject node to feed the url in then that would be better. In future if posting a flow please use the `</>` button.  
You say you get something not understandable, can you show us what you get?

**[Edit]** I can't get it to work either, it is sending back a binary buffer. I thought it might need a user-agent string but that doesn't seem to help, so I am out of ideas.

---

<div class="post-metadata">

**Author:** ![cdacruz](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cdacruz/32/29482_2.png) [@cdacruz](https://discourse.nodered.org/u/cdacruz)\
**Post date:** [21 December 2020 08:28 UTC](https://discourse.nodered.org/t/http-request-use-ssl-tls-connection/37713/4 "2020-12-21T08:28:22Z")

</div>

Thanks for your feed back.

This is my workflow, I just remove a date generator node which isn't a core node. Now all is in the inject node.

```auto
[{"id":"55666d2.b37d494","type":"debug","z":"601312ef.b153fc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":530,"y":1120,"wires":[]},{"id":"a208787b.0e0248","type":"http request","z":"601312ef.b153fc","name":"Build & Do Request","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://geodes.santepubliquefrance.fr/GC_indic.php?lang=fr&prodhash={{{random}}}&indic=tx_pe_gliss&dataset=sp_ti_tp_7j&view=map2&filters=semaine_glissante=2020-11-30-{{{date}}}","tls":"","persist":false,"proxy":"","authType":"","x":370,"y":1120,"wires":[["55666d2.b37d494"]]},{"id":"fc587a2.f4a4988","type":"inject","z":"601312ef.b153fc","name":"Trigger Manual","props":[{"p":"payload"},{"p":"random","v":"","vt":"date"},{"p":"date","v":"2020-12-21","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":1120,"wires":[["a208787b.0e0248"]]}]

```

The server send me back a binary buffer.

I also have made some tests with a WAMP plateform. Initially I had the same results as on nodered but after seeing the SSL parameters configured it works. That's why I think this is the right thing to do. The problem is, I don't know how to do it on node-red ...

---

<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:** [19 February 2021 08:28 UTC](https://discourse.nodered.org/t/http-request-use-ssl-tls-connection/37713/5 "2021-02-19T08:28:43Z")

</div>

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