该node-fetch
文档建议建议使用 using signal
,timeout
但没有提供任何关于原因的提示:
{
// These properties are part of the Fetch Standard
...
signal: null, // pass an instance of AbortSignal to optionally abort requests
// The following properties are node-fetch extensions
...
timeout: 0, // req/res timeout in ms, it resets on redirect. 0 to disable (OS limit applies). Signal is recommended instead.
...
}
(来源:https ://www.npmjs.com/package/node-fetch )
这是为什么?在什么情况下使用会有问题timeout
?