Skip to content

Instantly share code, notes, and snippets.

View sjcotto's full-sized avatar

Santiago Cotto sjcotto

  • Delaware | Montevideo
View GitHub Profile
var http = require("http")
, util = require("sys") // 0.3.x: require("util")
, fs = require("fs")
, client = http.createClient(80, "example.com")
, request = client.request("POST", "/", {"host":"example.com"})
// send body chunks
request.write("hello, world")
// pump a file through