Created
March 9, 2010 06:40
-
-
Save redsquirrel/326297 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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