cURL http request works fine, nodejs times out

I have observed this issue on multiple linode instances where a curl request to https://jsonplaceholder.typicode.com/todos/1 will work properly, but in the node repl fetch("https://jsonplaceholder.typicode.com/todos/1") will fail. This has began happening randomly and is interrupting my production services. The url I gave is just an example, the behavior is the same for any resource. Any tips?

1 Reply

I don't know anything about node.js and only a bit about curl, but I did a search on the title of your post and found this:

-- sw

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct