Http.get in intelli script task

Hi there.
I work on an script that lauches an http request after special conditions.
The script is ready and work fine in the intellishell.
The same script saved as recuring task runs without errors and find the right url’s to fire but the request itselft did not call the requested url.

const url1 = http://10.10.10.10/state.xml?relay1State=${room1Present ? '1' : '0'};
print(‘url1:’,url1);
http.get(url1, response1 => { print(HTTP request to ${url1} status code ${response1.statusCode})});

i tried the short form too http.get(url1);

any ideas?

the http was definded:
const http = require(‘http’);

solved… i only had to add
resp1 = http.get(url1);

1 Like

Hey Rainer, thanks for this message. I’m glad you found a solution. Have a nice week!
Yvonne