Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- http.get('http://localhost:9582', (res) => {
- var final_msg = "";
- res.setEncoding('utf8');
- res.on('data', (chunk) => {
- final_msg += chunk;
- });
- res.on('end', () => {
- message.reply(final_msg);
- console.log('No more data in response.');
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement