Skip to content

Instantly share code, notes, and snippets.



Created Oct 8, 2018
What would you like to do?
JavaScript Callback Example using Node.js and the request module
const request = require("request");
request("", function(error, response, body) {
if (error) {
// Handle error
console.log("Error: ", error);
} else {
// Successful request
console.log("body: ", body);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment