Wget在Express API上放弃太快

时间:2015-02-26 10:25:34

标签: rest express wget

我想下载Express.js REST API的结果,该API的处理速度非常慢(约10分钟)。我尝试了wget的几个超时选项,但是几分钟之后我就放弃了,而我要求它等待大约6万年。

wget "http://localhost:5000/slowstuff" --http-user=user --http-password=password --read-timeout=1808080878708 --tries=1
--2015-02-26 11:14:21--  http://localhost:5000/slowstuff
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:5000... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Authentication selected: Basic realm="Authorization Required"
Reusing existing connection to [localhost]:5000.
HTTP request sent, awaiting response... No data received.
Giving up.

修改 该问题不是来自wget超时值。如果超时设置为4秒,则错误不同:Read error (Connection timed out) in headers.我和curl有完全相同的问题。

我认为问题来自我的API。 It looks like a timeout of 2 minutes is set by default in NodeJS.

现在,我需要找到如何更改此值。

1 个答案:

答案 0 :(得分:1)

--http-password=password--read-timeout=1808080878708 

缺少空白。使用

--http-password=password --read-timeout=1808080878708