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
msgdetails?
The goal: 
is to get a simple
GPS coords from OSM using nominative. (Example)
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:
-
First I've thought let's ask ChatGPT --> it gave me 2 simple functions to:
- an OSM async, which used
fetch(url) - a toast function
None of them worked, because Node-RED does not allow to use
fetch()from a function - an OSM async, which used
- 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-deletemsg.part?) -
What about the SSL checkbox? Why getting unchecked if I click DONE ?
No help about it ! -
Also:
msg.urlis 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:
- The result was only the http result, nothing else!

- So the original
msgdata is all gone!
- No reference left to identify "what was the question? 42 ?"

All reference to the point I was asking the coords for, was deleted by the node.
WTF ???

- The result was only the http result, nothing else!
- Than I've found Axios.
-
After installing it from Palette Manager,
-
and using the same way as the "http request node":
same result, deleted
msg.data= no go.
-
ChatGPT recommended to call from a function with this code:
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')
