Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
POST with @mikeal request
request({
method: "POST",
uri: "http://example.com/action",
json: {
foo: "foo",
bar: "bar"
}
}, function (error, response, body) {
if(response.statusCode === 201){
console.log("posted");
} else {
console.log("status code was "+response.statusCode);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.