# Collect https address

**URL:** <https://discourse.nodered.org/t/collect-https-address/27329>\
**Category:** General\
**Created:** [26 May 2020 18:44 UTC](https://discourse.nodered.org/t/collect-https-address/27329 "2020-05-26T18:44:24Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![mykerinos1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mykerinos1/32/46877_2.png) [@mykerinos1](https://discourse.nodered.org/u/mykerinos1)\
**Post date:** [26 May 2020 18:44 UTC](https://discourse.nodered.org/t/collect-https-address/27329/1 "2020-05-26T18:44:25Z")

</div>

Hello , i use node python to launch a progamm wich create a unique HTTP each time i launch it. i would like to collect only The last link or better launch it directly. thanks a lot How can i do ?

 ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/5/e5bf02e46b37a2c8d36c3c8c76a32095a8d232ec.jpeg)

---

<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:** [26 May 2020 18:50 UTC](https://discourse.nodered.org/t/collect-https-address/27329/2 "2020-05-26T18:50:28Z")

</div>

Why don't you just generate the URL in node-red and miss out the python part altogether?

Secondly, if you must call python, are you able to modify it to send the data in JSON format?

Lastly, if you have no other options, use regex to extract the URL from that string.

Ps, it's not 100% clear what is generating that string as you haven't attached a debug node to the python node - so some of what I've said is speculation.

---

<div class="post-metadata">

**Author:** ![mykerinos1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mykerinos1/32/46877_2.png) [@mykerinos1](https://discourse.nodered.org/u/mykerinos1)\
**Post date:** [27 May 2020 02:34 UTC](https://discourse.nodered.org/t/collect-https-address/27329/3 "2020-05-27T02:34:55Z")

</div>

This created link download data from web and i Have to create a new one watch time  
I will try what you say after my day work  
I think json can be a good thing but i dont know how to use very well for the moment

---

<div class="post-metadata">

**Author:** ![mykerinos1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mykerinos1/32/46877_2.png) [@mykerinos1](https://discourse.nodered.org/u/mykerinos1)\
**Post date:** [27 May 2020 15:43 UTC](https://discourse.nodered.org/t/collect-https-address/27329/4 "2020-05-27T15:43:51Z")

</div>

i can take only the link in msg.payload but how can i execute it to receive data from this link

---

<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:** [27 May 2020 18:19 UTC](https://discourse.nodered.org/t/collect-https-address/27329/5 "2020-05-27T18:19:22Z")

</div>

Use a http request node.

The [cookbook](https://cookbook.nodered.org/http/) has lots of examples. Work through them and you get your data in no time

I have closed your second thread. Please don't start new topics on the same subject.

---

<div class="post-metadata">

**Author:** ![mykerinos1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mykerinos1/32/46877_2.png) [@mykerinos1](https://discourse.nodered.org/u/mykerinos1)\
**Post date:** [27 May 2020 18:58 UTC](https://discourse.nodered.org/t/collect-https-address/27329/6 "2020-05-27T18:58:50Z")

</div>

sorry for double post i thought that was a little bit different  
i tried with http response but in debug i have " no reponse object"  
without http response python node send me the link in debug" it's the secure link i m waiting for [https://api.weatherlink.com/v2/current/90419?api-key=ajmnxiysttgggzjwkxj6ajghlngti1xe&api-signature=d16dfc15836f22fe023d546b24fc6a495c69bc3dd358c94e332d210010336862&t=1590604921](https://api.weatherlink.com/v2/current/90419?api-key=ajmnxiysttgggzjwkxj6ajghlngti1xe&api-signature=d16dfc15836f22fe023d546b24fc6a495c69bc3dd358c94e332d210010336862&t=1590604921)"  
This link must be open to see all the values from my weather stations here's a little exemple of what i want.  
So do you think it's possible ? i look http cookbook but i' m a basic users and i don't really understant how to do that. Can you help me ?  
thanks a lot

```auto
{"sensors":[{"lsid":314240,"data":[{"rx_state":0,"wind_speed_hi_last_2_min":2,"hum":42.7,"wind_dir_at_hi_speed_last_10_min":9,"wind_chill":67.5,"rain
```

---

<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:** [27 May 2020 21:03 UTC](https://discourse.nodered.org/t/collect-https-address/27329/7 "2020-05-27T21:03:16Z")

</div>

Change the debug node - set to show complete message.

Expand all properties. What do you see?

---

<div class="post-metadata">

**Author:** ![mykerinos1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mykerinos1/32/46877_2.png) [@mykerinos1](https://discourse.nodered.org/u/mykerinos1)\
**Post date:** [28 May 2020 13:55 UTC](https://discourse.nodered.org/t/collect-https-address/27329/8 "2020-05-28T13:55:02Z")

</div>

Hello, here's what i see

```auto
{"payload":"https://api.weatherlink.com/v2/current/90419?api-key=ajmnxiysttgggzjwkxj6ajghlngti1xe&api-signature=259367c298696e63f8bc79e939a8beef7cb0a1ac9110493e287da3483a9064d4&t=1590674008","_msgid":"4eeb27f5.828708"}

```

and heres the value if open the link in a browser

```auto
"sensors":[{"lsid":314240,"data":[{"rx_state":0,"wind_speed_hi_last_2_min":10,"hum":36.4,"wind_dir_at_hi_speed_last_10_min":27,"wind_chill":79.8,"rain_rate_hi_last_15_min_clicks":0,"thw_index":78.4,"wind_dir_scalar_avg_last_10_min":9,"rain_size":2,"uv_index":null,"wind_speed_last":4,"rainfall_last_60_min_clicks":0,"wet_bulb":57.6,"rainfall_monthly_clicks":30,"wind_speed_avg_last_10_min":5.75,"wind_dir_at_hi_speed_last_2_min":25,"rainfall_daily_in":0,"wind_dir_last":311,"rainfall_daily_mm":0,"rain_storm_last_clicks":null,"tx_id":1,"rain_storm_last_start_at":null,"rain_rate_hi_clicks":0,"rainfall_last_15_min_in":0,"rainfall_daily_clicks":0,"dew_point":50.8,"rainfall_last_15_min_mm":0,"rain_rate_hi_in":0,"rain_storm_clicks":30,"rain_rate_hi_mm":0,"rainfall_year_clicks":30,"rain_storm_in":0.23622048,"rain_storm_last_end_at":null,"rain_storm_mm":6,"wind_dir_scalar_avg_last_2_min":10,"heat_index":78.4,"rainfall_last_24_hr_in":null,"rainfall_last_60_min_mm":0,"trans_battery_flag":0,"rainfall_last_60_min_in":0,"rain_storm_start_time":1590219480,"rainfall_last_24_hr_mm":null,"rainfall_year_in":0.23622048,"wind_speed_hi_last_10_min":13,"rainfall_last_15_min_clicks":0,"rainfall_year_mm":6,"wind_dir_scalar_avg_last_1_min":2,"temp":79.8,"wind_speed_avg_last_2_min":6.18,"solar_rad":null,"rainfall_monthly_mm":6,"rain_storm_last_mm":null,"wind_speed_avg_last_1_min":5.62,"thsw_index":null,"rainfall_monthly_in":0.23622048,"rain_rate_last_mm":0,"rain_rate_last_clicks":0,"rainfall_last_24_hr_clicks":null,"rain_storm_last_in":null,"rain_rate_last_in":0,"rain_rate_hi_last_15_min_mm":0,"rain_rate_hi_last_15_min_in":0,"ts":1590674135}],"sensor_type":43,"data_structure_type":10},{"lsid":314237,"data":[{"battery_voltage":90,"ip_v4_gateway":"192.168.0.254","rapid_records_sent":2077,"firmware_version":1586914793,"uptime":597534,"touchpad_wakeups":16,"ip_v4_address":"192.168.0.7","bootloader_version":1550707628,"local_api_queries":36,"rx_bytes":11775324,"health_version":1,"radio_version":621020416,"espressif_version":1534381024,"ip_address_type":1,"link_uptime":597516,"network_type":2,"input_voltage":4683,"tx_bytes":2506267,"ts":1590673500}],"sensor_type":504,"data_structure_type":15},{"lsid":314238,"data":[{"bar_absolute":29.096,"bar_sea_level":30.267,"bar_offset":-0.001,"bar_trend":-0.046,"ts":1590674135}],"sensor_type":242,"data_structure_type":12},{"lsid":314239,"data":[{"temp_in":88.1,"heat_index_in":86.2,"dew_point_in":53.3,"ts":1590674135,"hum_in":30.5}],"sensor_type":243,"data_structure_type":12}],"generated_at":1590674194,"station_id":90419}

```

---

<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:** [28 May 2020 14:44 UTC](https://discourse.nodered.org/t/collect-https-address/27329/9 "2020-05-28T14:44:05Z")

</div>

> [@mykerinos1](#):
>
> Hello, here's what i see

That doesn't look anything like the output of a http request node. Nor doe it look like you have set show full message.

Show a screenshot shot of your flow and the debug output from into and out of the http request.

---

<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:** [28 May 2020 14:58 UTC](https://discourse.nodered.org/t/collect-https-address/27329/10 "2020-05-28T14:58:55Z")

</div>

@Steve-Mcl I think you've misinterpreted what you're being shown.

This is the message being received that contains the url to get. The question is how to do that.

@mykerinos1 You say you've tried with the HTTP Response node - that is not the right node to use. You should use the HTTP Request node. That node will make an http request to the url provided in `msg.url`. So you will need to add a Change node to **move** `msg.payload` to `msg.url`.

---

<div class="post-metadata">

**Author:** ![mykerinos1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mykerinos1/32/46877_2.png) [@mykerinos1](https://discourse.nodered.org/u/mykerinos1)\
**Post date:** [28 May 2020 15:17 UTC](https://discourse.nodered.org/t/collect-https-address/27329/11 "2020-05-28T15:17:06Z")

</div>

@Steve-Mcl  
iin fact i tried with http response so i changed it with http request here's my flow i don't know how send my url to the http request as @knolleary said  
i put a change function node but i don't know how to set

 ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/0/d072c57744f08e88598b032e111d83a92174dccb.jpeg)

---

<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:** [28 May 2020 15:18 UTC](https://discourse.nodered.org/t/collect-https-address/27329/12 "2020-05-28T15:18:49Z")

</div>

At the moment, the url you have is in `msg.payload`. You need it to be in `msg.url` before you pass it to the HTTP Request node.

Add a **Change** node before the HTTP Request node. Configure it to **move** `msg.payload` to `msg.url`.

---

<div class="post-metadata">

**Author:** ![mykerinos1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mykerinos1/32/46877_2.png) [@mykerinos1](https://discourse.nodered.org/u/mykerinos1)\
**Post date:** [28 May 2020 15:23 UTC](https://discourse.nodered.org/t/collect-https-address/27329/13 "2020-05-28T15:23:52Z")

</div>

i do that but http request said there's no url link

 ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/4/547426a1a549e8e46d7435820450d35afbf5dd8a.jpeg)

---

<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:** [28 May 2020 15:24 UTC](https://discourse.nodered.org/t/collect-https-address/27329/14 "2020-05-28T15:24:19Z")

</div>

Change the **set** option to **move**

---

<div class="post-metadata">

**Author:** ![mykerinos1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mykerinos1/32/46877_2.png) [@mykerinos1](https://discourse.nodered.org/u/mykerinos1)\
**Post date:** [28 May 2020 15:26 UTC](https://discourse.nodered.org/t/collect-https-address/27329/15 "2020-05-28T15:26:06Z")

</div>

It works !!!! 😁

---

<div class="post-metadata">

**Author:** ![mykerinos1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mykerinos1/32/46877_2.png) [@mykerinos1](https://discourse.nodered.org/u/mykerinos1)\
**Post date:** [28 May 2020 15:27 UTC](https://discourse.nodered.org/t/collect-https-address/27329/16 "2020-05-28T15:27:20Z")

</div>

Thanks a lot .thanks also to @Steve-Mcl for your help

---

<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:** [28 May 2020 15:51 UTC](https://discourse.nodered.org/t/collect-https-address/27329/17 "2020-05-28T15:51:27Z")

</div>

Another one stumped by the change node.

A few threads I've seen lately lead me to think **Copy** might be more appropriate than **Set** (translates better (see the [German issue](https://discourse.nodered.org/t/restart-flow-after-changing-data/27104/25) where it reads as **Until** ),. I feel **Copy** is a bit clearer and as a bonus, the 2 fields would remain in the same place when you switch between **Move** and **Copy** mode)

_(Not the place to discuss this I know - but contextually related)_

---

<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:** [11 June 2020 20:44 UTC](https://discourse.nodered.org/t/collect-https-address/27329/19 "2020-06-11T20:44:39Z")

</div>

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