Skip to content

Instantly share code, notes, and snippets.

@nicholas0g
Created May 25, 2018 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicholas0g/256c1b358dbe688ead44a0e2a769aad8 to your computer and use it in GitHub Desktop.
Save nicholas0g/256c1b358dbe688ead44a0e2a769aad8 to your computer and use it in GitHub Desktop.
var rp = require('request-promise');
var absolute_path="http://api.cineprime.it"
var richiesta={};
richiesta.simple=function(url,header,callback){
var options = {
uri: absolute_path+url,
headers: header,
json: true
};
rp(options)
.then(function (risultato) {
callback(risultato);
})
.catch(function (err) {
callback("ERRORE")
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment