Answers for "how ot send user agent in nodejs https header"

1

how ot send user agent in nodejs https header

const options = {
  hostname: 'www.panda.tv',
  path: 'ajax_chatinfo?roomid=89757',
  headers: { 'User-Agent': 'Mozilla/5.0' }
};

http.get(options, function(res) {
  res.on('data', function(chunk) { console.log(chunk) });
});
Posted by: Guest on July-16-2020
0

how ot send user agent in nodejs https header

http.get({ url: 'http://www.panda.tv/ajax_chatinfo?roomid=89757',
    agent: 'Mozilla/5.0' }, function(res) {
    res.on('data', function(chunk) {
        doSomething();
    });
});
Posted by: Guest on July-16-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language