• The code

    console.log("back from network?",res)
    didn't print anything.

    tp.get("http://www.pur3.co.uk/hello.txt"­, function (res) {
         console.log("back from network?",res)
          let str = ''; 
          res.on('data', chunk => {
            console.log("chunk",chunk);
            str += chunk;
          });
          res.on('end', () => {
            console.log("result: --->   ", str);
          });
        });
    

    In the Mehtod recv(), I did got datas and retruned them. But where these datas go I really don't know, and how do they go back to http.get response body?

    console.log("[recv data]", r)

    return r;
    
About

Avatar for Robin @Robin started