Created
May 4, 2015 10:04
-
-
Save anstaendig/529c266da10f70d19e45 to your computer and use it in GitHub Desktop.
request example
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
//Load the request module | |
var request = require('request'); | |
//Lets configure and request | |
request({ | |
url: '', //URL to hit | |
method: 'POST' | |
} | |
}, function(err, response, body) { | |
if(!err && response.statusCode == 200) { | |
var data = JSON.parse(body); | |
} else { | |
console.log(err); | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment