Feature request: synchronous network request with timeout option
Reported by
project....@gmail.com,
Sep 29 2017
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 Steps to reproduce the problem: Currently, the XMLHttpRequest synchronous API cannot take a timeout option. Could we make a new API which can do synchronous network request but with a timeout option? (One example is https://curl.haxx.se/libcurl/c/CURLOPT_TIMEOUT.html) What is the expected behavior? What went wrong? Without a synchronous request API with timeout, it makes many cases difficult to implement. Did this work before? N/A Does this work in other browsers? N/A Chrome version: 61.0.3163.100 Channel: stable OS Version: OS X 10.13.0 Flash Version:
,
Oct 2 2017
,
Oct 11 2017
Sync XHR is discouraged and we're not going to add synchronous request features.
,
Oct 12 2017
Sync XHR is discouraged because it may block the whole program with unexpected time. But this feature request is not to encourage the old "Sync XHR" back. The feature suggested here is a better "synchronous request", not "XHR". One example in C++ language is https://curl.haxx.se/libcurl/c/CURLOPT_TIMEOUT.html, which can do synchronous request but with an expected timeout option. |
|||
►
Sign in to add a comment |
|||
Comment 1 by manoranj...@chromium.org
, Sep 29 2017Labels: -Type-Bug M-63 Type-Feature
Status: Untriaged (was: Unconfirmed)