You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

16 lines
399 B

var c = new node.http.Client(8000, "localhost")
var req = c.get("/hello/world", [["Accept", "*/*"]]);
req.finish(function (res) {
puts("got response: " + res.status_code.toString());
res.onBody = function (chunk) {
puts("got response body <" + chunk.encodeUtf8() + ">");
return true;
};
res.onBodyComplete = function () {
puts("response complete!");
return true;
};
});