@Waynedejager looking at the URL you've provided, I can see its using chunked transfer-encoding and I think its slightly malformed in its response.
When I get it with curl -vvv
I see the error:
- Leftovers after chunking: 5 bytes
This tells us the response has 5 bytes more in it than expected (I think). It would appear that curl and browsers know how to handle this sort of error by assuming those extra bytes are meant to be there. It appears the node.js HTTP library is less forgiving.
I just tried this code in a node.js shell using the core HTTP library:
var http = require("http");
var req = http.get({
hostname: "41.192.149.206",
port: 8080,
path: '/query?select=%5Btime.iso,ch1.d2,ch1.amps.d2,ch1.va.d2,ch1.pf.d2%5D&begin=h-30m&end=h&group=30m&format=json&header=yes'
},(res) => { }).on('error', (e) => {
console.error(e);
})
So I don't think you'd have much luck with other http modules that use this library under the covers.
Is there any scope to modify the server implementation?