Skip to content

Instantly share code, notes, and snippets.

@aaayushsingh
Created May 14, 2017 06:09
Show Gist options
  • Save aaayushsingh/6852bacbc66fea783d6b74a8832d9695 to your computer and use it in GitHub Desktop.
Save aaayushsingh/6852bacbc66fea783d6b74a8832d9695 to your computer and use it in GitHub Desktop.
app.get('/',function(req,res){
console.log(req.method+" request received at "+req.url);
request({
url:"https://sc.productrx.com/public/",
method:"GET",
qs:{resource:"schema",data_type:"JSON"}
},function(err,response,body){
if(err){
console.log(err);
res.status(300).json(error.apiError);
}
else{
console.log(body);
//var body=JSON.parse(body);
//res.status(200).json({"success":true,"body":body.users});
}
}); });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment