New issue
Advanced search Search tips

Issue 770212 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Oct 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Feature



Sign in to add a comment

Feature request: synchronous network request with timeout option

Reported by project....@gmail.com, Sep 29 2017

Issue description

UserAgent: 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:
 
Components: Blink>Network
Labels: -Type-Bug M-63 Type-Feature
Status: Untriaged (was: Unconfirmed)

Comment 2 Deleted

Summary: Feature request: synchronous network request with timeout option (was: Feature request: synchronous network request without timeout)
Status: WontFix (was: Untriaged)
Sync XHR is discouraged and we're not going to add synchronous request features.
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