Skip to content
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

timeout for specific request #603

Closed
vladRudenua23 opened this issue Apr 29, 2024 · 2 comments · Fixed by #604
Closed

timeout for specific request #603

vladRudenua23 opened this issue Apr 29, 2024 · 2 comments · Fixed by #604
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@vladRudenua23
Copy link

Hi it will be better to provide an option for request to set timeout for waiting requests (i'm not talking about connection timeout). Manually, i can do that, but when I'm running Build Runner, I need to make this "modification" again.

for example, my user_network_service.chopper.dart

  @override
  Future<Response<UserModel>> profile() {
    final Uri $url = Uri.parse('/user/profile');
    final Request $request = Request(
      'GET',
      $url,
      client.baseUrl,
    );
    return client
        .send<UserModel, UserModel>($request)
        .timeout(Duration(seconds: 5));
  }
@vladRudenua23 vladRudenua23 added the enhancement New feature or request label Apr 29, 2024
@techouse techouse self-assigned this May 1, 2024
@techouse
Copy link
Collaborator

techouse commented May 1, 2024

Hey,

Thanks for the proposal! I'll try to implement it.

@techouse techouse added this to the 8.0.0 milestone May 1, 2024
@techouse techouse linked a pull request May 1, 2024 that will close this issue
@techouse
Copy link
Collaborator

techouse commented May 1, 2024

@vladRudenua23 would you mind test-driving PR #604 🙏

Can you please play around with the master branch and see if it fixes your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants