Http request (open connection)

Niclas,
Since I have no clue whether this will work, I will try to minimize the effort you spend to it...

  1. You need to add one line to your settings.js file (and restart Node-RED):

    image

    Note: this allows you to use the 'request' NPM package inside a function node using var request = global.get('request');.

  2. Import this test flow:

    image

    [{"id":"95326d57.32d04","type":"function","z":"97e84354.4bf71","name":"Get chunks","func":"var request = global.get('request');\n\nrequest({ \n    method: 'GET',\n    uri: 'https://jigsaw.w3.org/HTTP/ChunkedScript',\n    //uri: 'http://192.168.80.121/arx/eventexport?end_date=keep'\n    gzip: true\n},\nfunction (error, response, body) {\n      console.log('Most probably the stream has been ended ...')\n    }\n  )\n  .on('data', function(data) {\n    // decompressed data as it is received\n    console.log('decompressed chunk arrived: ' + data)\n    node.send({payload: data});\n})","outputs":1,"noerr":0,"initialize":"","finalize":"","x":430,"y":1080,"wires":[["4bb80b80.0ce0b4"]]},{"id":"f43d55de.a74158","type":"inject","z":"97e84354.4bf71","name":"Start streaming","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":210,"y":1080,"wires":[["95326d57.32d04"]]},{"id":"4bb80b80.0ce0b4","type":"debug","z":"97e84354.4bf71","name":"Display chunks","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":650,"y":1080,"wires":[]}]
    
  3. Inside the function node I call the first http1.1 test url from this page:

    image

    That url returns a chuncked encode response:

    image

    P.S. Afterwards you can uncomment your url inside the function node ...

  4. When you trigger the function node, you will see now multiple entries in the debug sidebar:

    So instead of waiting for the entire response to arrive, the function node will send an output message every time a chunk is received. That is why you get multiple output messages...

Hopefully this way you can get some data from your server...