Skip to content

Instantly share code, notes, and snippets.

@redsquirrel
Created March 9, 2010 06:40
Show Gist options
  • Save redsquirrel/326297 to your computer and use it in GitHub Desktop.
Save redsquirrel/326297 to your computer and use it in GitHub Desktop.
// This uses Node.js to push audience members into Mad Mimi
var sys = require("sys"),
http = require("http")
var mimi = http.createClient(80, "www.madmimi.com")
var request = mimi.request("POST", "/[email protected]&api_key=75aFAKEe48API51ffKEYcbcc300", {"host": "www.madmimi.com"})
request.sendBody("csv_file=email,dog\[email protected],cheddar bob")
request.finish(function (response) {
sys.puts(response.headers.status)
response.setBodyEncoding("utf8")
response.addListener("body", function (body) {
sys.print(body)
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment