Re: [whatwg/fetch] Add option to reject the fetch promise automatically after a certain time elapsed (with no API for arbitrary aborts) (#179)

Indeed, I've mixed up two concerns: 

1. Externally timing out via promise/setTimeout wasn't aborting the underlying network request, unlike timing out via XHR. 

2. I wanted it to be even smarter than XHR to support timeout since the last received bit of data, rather than since start of the request.

I think case 1 is solved. For case 2 I've ended up splitting timeout into timeout for initial response (http headers) and timeout for the whole body. That ended up being close enough to solve the problem of distinguishing working slow connections from not getting any server response.

Anyway, I'm not working any more on the project that motivated this feature request, so I don't have up to date information whether this is still needed.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/179#issuecomment-785803098

Received on Thursday, 25 February 2021 10:48:44 UTC