Advertisement
Guest User

Untitled

a guest
Oct 3rd, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. app.post('/api/userlist', function (req, res) {
  2.     var url = 'http://myanimelist.net/malappinfo.php?u='+req.userName+'&status=all&type=anime';
  3.     http.get(url, function(resp) {
  4.         var malRawResponse = ''
  5.         resp.on('data', function(chunk) {
  6.             malRawResponse += chunk;
  7.         });
  8.        
  9.         resp.on('end', function() {
  10.             console.log(malRawResponse);
  11.             res.send(malRawResponse);
  12.         });
  13.        
  14.     });
  15. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement