Created
May 14, 2017 06:09
-
-
Save aaayushsingh/6852bacbc66fea783d6b74a8832d9695 to your computer and use it in GitHub Desktop.
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
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