# Why is so difficult to get a https REST + keep \`msg\`? (OSM)

**URL:** <https://discourse.nodered.org/t/why-is-so-difficult-to-get-a-https-rest-keep-msg-osm/100892>\
**Category:** General\
**Tags:** http-request\
**Created:** [2 May 2026 14:40 UTC](https://discourse.nodered.org/t/why-is-so-difficult-to-get-a-https-rest-keep-msg-osm/100892 "2026-05-02T14:40:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![PizzaProgram](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pizzaprogram/32/19431_2.png) [@PizzaProgram](https://discourse.nodered.org/u/PizzaProgram)\
**Post date:** [2 May 2026 14:40 UTC](https://discourse.nodered.org/t/why-is-so-difficult-to-get-a-https-rest-keep-msg-osm/100892/1 "2026-05-02T14:40:06Z")

</div>

_Sorry for spamming the topic but after 4 days of struggle I must ask:_

- Am I missing something trivial here?
- Or is it really NR making hard to get a https GET while keeping the `msg` details?

# The goal: 🛤

is to get a simple 🛰 GPS coords from OSM using nominative. ([Example](https://nominatim.openstreetmap.org/search?format=jsonv2&limit=1&accept-language=hu-HU&countrycodes=hu&q=2000%2C%20Szentendre%20Duna%20korz%C3%B3%2015))

```json
lat: 47.6678184
lon: 19.0774145

```

And keep the user **informed** about the progress. (Using WorldMap + Toast)  
... maybe even a timeout countdown, a non-success info, etc.

## The way:

1. First I've thought let's ask ChatGPT --\> it gave me 2 simple functions to:

* * *

1. The recommended "http request node" was a total failure:

- did not work at first, because I've used `{{{msg.url}}}` instead of {{{url}}}  
_(That's not logical. Also why didn't the code auto-delete `msg.` part?)_

- What about the SSL checkbox? Why getting unchecked if I click DONE ?  
_No help about it !_

- Also: `msg.url` is reserved, gave me a strange "deprecated" error. Had to dig for hours...  
_No warning in help about it either!_

- And the final arrow into my back:

* * *

1. Than I've found [Axios](https://flows.nodered.org/node/node-red-contrib-axios).

- After installing it from Palette Manager,

- and using the same way as the "http request node":

- ChatGPT recommended to call from a function with this code:

```js
const axios = global.get('axios');

async function autoOSM(F_) {

    try {
        let res = await axios.get(F_.url, {
           headers: {
             'Accept':'application/json',
             'User-Agent':'Node-RED'
           }
        });

        let data = res.data;
...

```

- but it gives this **error** :  
`Cannot read properties of undefined (reading 'get')`

## At this point I've decided to open this topic to ask for 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:** [2 May 2026 16:21 UTC](https://discourse.nodered.org/t/why-is-so-difficult-to-get-a-https-rest-keep-msg-osm/100892/2 "2026-05-02T16:21:01Z")

</div>

> [@PizzaProgram](#):
>
> id not work at first, because I've used `{{{msg.url}}}` instead of {{{url}}}  
> _(That's not logical. Also why didn't the code auto-delete `msg.` part?)_

The built in help states:

> If not configured in the node, this optional property sets the url of the request.

i.e. leave it blank and you can set msg.url before the http request.

> [@PizzaProgram](#):
>
> Also: `msg.url` is reserved, gave me a strange "deprecated" error. Had to dig for hours...  
> _No warning in help about it either!_

As above, if you set msg.url BEFORE the node AND populate the url field, it gives you a warning:

> Warning: msg properties can no longer override set node properties. See bit.ly/nr-override-msg-props

And that bitly address takes you to [Deprecated: Message properties overriding set node properties · node-red/node-red Wiki · GitHub](https://github.com/node-red/node-red/wiki/Deprecated:-Message-properties-overriding-set-node-properties) where it tells you exactly what/why

> [@PizzaProgram](#):
>
> And the final arrow into my back:
> 
> - The result was only the http result, nothing else! 🫗
> - So the original `msg` data is all gone! 💨
> - No reference left to identify "what was the question? 42 ?" ⁉

Assuming your value "what was the question? 42 ?" was in `msg.payload`, then you cannot expect it to be kept when the http request node itself returns its own result in `msg.payload`.

If you want to retain original msg values put them/move them/copy them to literally anywhere except `msg.payload` e.g...

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

---

<div class="post-metadata">

**Author:** ![PizzaProgram](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pizzaprogram/32/19431_2.png) [@PizzaProgram](https://discourse.nodered.org/u/PizzaProgram)\
**Post date:** [2 May 2026 16:46 UTC](https://discourse.nodered.org/t/why-is-so-difficult-to-get-a-https-rest-keep-msg-osm/100892/3 "2026-05-02T16:46:07Z")

</div>

@Steve-Mcl Thank your very much the detailed explanation! ❤

> [@Steve-Mcl](#):
>
> If you want to retain original msg values put them/move them/copy them to literally anywhere except `msg.payload` e.g...

Yes, **I did that** , before I've opened this topic!

## The problem was:

- the Debug node was not set to show the "whole `msg`" !

🤯

I do not know who's idea was setting all debug notes to `msg.payload` by default, but I keep forgetting to change them one by one.  
It is very rare, that a msg is containing only the payload as important data.

---

<div class="post-metadata">

**Author:** ![PizzaProgram](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pizzaprogram/32/19431_2.png) [@PizzaProgram](https://discourse.nodered.org/u/PizzaProgram)\
**Post date:** [2 May 2026 17:01 UTC](https://discourse.nodered.org/t/why-is-so-difficult-to-get-a-https-rest-keep-msg-osm/100892/4 "2026-05-02T17:01:49Z")

</div>

> [@Steve-Mcl](#):
>
> And that bitly address takes you to [Deprecated: Message properties overriding set node properties · node-red/node-red Wiki · GitHub](https://github.com/node-red/node-red/wiki/Deprecated:-Message-properties-overriding-set-node-properties) where it tells you exactly what/why

Exactly that's my point. Call me an idiot, but (after reading it 5x ! ) **maybe** :

- if I could not understand,
- users with less English knowledge & less NR experience

## will understand it even less.

So what if help would contain a _simple sentence_ instead, like:

> Leave URL blank, if you send it via `msg.url` !

And the node would accept both {{{msg.myUrl}}} and {{{myUrl}}} too?  
Probably it would take +1 line in the code to make it more user friendly:

```js
if ( mustage_value === undefined && ... === 'msg.' ) ...

```

---

<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 May 2026 17:02 UTC](https://discourse.nodered.org/t/why-is-so-difficult-to-get-a-https-rest-keep-msg-osm/100892/5 "2026-05-16T17:02:47Z")

</div>

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