Friday 21 June 2019

Node http requests not working for one certain domain

This is driving me crazy. For this whole domain typhoon2000.ph http requests made from node.js do not seem to work, but no error is given. Other domains work just fine. Requesting with curl works just fine also:$ curl -s http://www.typhoon2000.ph/multi/ | wc -l 44 $ cat test-fetch const fetch = require('node-fetch'); fetch('http://www.typhoon2000.ph/multi/') .then(res => res.text()) .then(body => console.log(body)) .catch(err => console.error(err)); $ node test-fetch | wc -l 0 Can someone figure this out?

Submitted June 22, 2019 at 03:17AM by dub4u

No comments:

Post a Comment