Skip to content

Add timeout parameter for downloading - #482

Open
an920107 wants to merge 2 commits into
Baseflow:mainfrom
an920107:feature/timeout
Open

an920107 wants to merge 2 commits into
Baseflow:mainfrom
an920107:feature/timeout

Conversation

@an920107

@an920107 an920107 commented Feb 19, 2025 •

Copy link
Copy Markdown

✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)

This PR is to resolve #141, supporting pass timeout for downloading.

⤵️ What is the current behavior?

There is no way to set timeout.

🆕 What is the new behavior (if this is a feature change)?

A timeout duration can be set, and the http request will be timeouted after the duration (a TimeoutException will be thrown). If timeout is not set, all behaviors are same with the original.

💥 Does this PR introduce a breaking change?

N/A

🐛 Recommendations for testing

  1. Check if it will stop and throw a TimeoutException after the duration.
  2. Check if the behavior is same as original when timeout is not set.

📝 Links to relevant issues/docs

Issue #141.

🤔 Checklist before submitting

  • All projects build
  • Follows style guide lines (code style guide)
  • Relevant documentation was updated
  • Rebased onto current develop

@an920107
an920107 marked this pull request as ready for review February 19, 2025 04:04
@Gustl22

Gustl22 commented Aug 6, 2025 •

Copy link
Copy Markdown

@martijn00 can we have this reviewed? Thans for the time effort :D
Or is this already possible through intercepting dio / http service?

@rickdijk

Copy link
Copy Markdown
Contributor

main has moved since you opened this. #518 (758e206), #520 (313bfa1), f803860 and the formatting pass in cce9a65 changed lib/src/cache_manager.dart, lib/src/cache_managers/image_cache_manager.dart and lib/src/web/web_helper.dart, which your pull request also changes, so you are better placed than we are to resolve it. Could you merge main into your branch? The other conflicts are formatting and the generated test/mock.mocks.dart, which dart format . and dart run build_runner build --delete-conflicting-outputs take care of. Happy to help if anything is unclear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

a way to setup the request timeout

3 participants