You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ node test.js
{ Error: read ETIMEDOUT
at exports._errnoException (util.js:1029:11)
at TLSWrap.onread (net.js:575:26) code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'read' }
Fetching the same URL with curl works fine:
$ curl https://www.hertz.com/rentacar/reservation/\#vehicle
<!doctype html>
... the rest of the page follows ...
I searched a lot but could not find a working fix. I've tried passing secureProtocol: 'TLSv1_2_method' in request options (as the site uses TLS v1.2) as well as TLSv1_2_client_method and TLSv1_2_server_method
but that didn't help, though it resulted in another error:
$ node test.js
{ Error: connect ECONNREFUSED 127.0.0.1:443
at Object.exports._errnoException (util.js:1029:11)
at exports._exceptionWithHostPort (util.js:1052:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1093:14)
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 443 }
Version: v7.7.1
Platform: Darwin pc.local 16.4.0 Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64
Subsystem: https
The text was updated successfully, but these errors were encountered:
sryze
changed the title
https.get() can't connect to a website (ETIMEDOUT) but curl can
https.request() can't connect to a website (ETIMEDOUT) but curl can
Mar 5, 2017
I'm trying to make a get request to a website over HTTPS but it always fails with
ETIMEDOUT
. Here is my code:Output:
Fetching the same URL with
curl
works fine:I searched a lot but could not find a working fix. I've tried passing
secureProtocol: 'TLSv1_2_method'
in request options (as the site uses TLS v1.2) as well asTLSv1_2_client_method
andTLSv1_2_server_method
but that didn't help, though it resulted in another error:
The text was updated successfully, but these errors were encountered: