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
Earlier I posted on #175 Then the thread was locked and marked as resolved. I just wanted the opportunity to update my response to #175 and propose that the timeout from node-fetch be integrated directly into the Fetch API. When I first uploaded my AjaxService from #175 I failed to realize that the node-fetch library I was using already had support for timeout, so here is the updated code. This seems to work well so if anyone really needs a timeout I would highly recommend looking into node-fetch rather than the ES6 Fetch API.
propose that the timeout from node-fetch be integrated directly into the Fetch API
The right place to do this is linked from #175 (comment). This repository contains a JS implementation of the Fetch API, but we don't control what goes into the standard API.
FWIW, I've opened an issue whatwg/fetch#951 with a proposal for a timeout option that solves 90% of use cases, in case anyone's interested. I think it's super important to add to make sure calls to fetch (or res.json()) don't hang indefinitely.
Earlier I posted on #175 Then the thread was locked and marked as resolved. I just wanted the opportunity to update my response to #175 and propose that the timeout from node-fetch be integrated directly into the Fetch API. When I first uploaded my AjaxService from #175 I failed to realize that the node-fetch library I was using already had support for timeout, so here is the updated code. This seems to work well so if anyone really needs a timeout I would highly recommend looking into node-fetch rather than the ES6 Fetch API.
node-fetch features: https://github.com/bitinn/node-fetch#features
The updated service:
The text was updated successfully, but these errors were encountered: