Closed techouse closed 7 months ago
This PR adds a new timeout annotation
timeout
/// Set a timeout for the request final Duration? timeout;
that can be used like
@Get(path: 'get_timeout', timeout: Duration(seconds: 42)) Future<Response<String>> getTimeoutTest();
and generates the following code
@override Future<Response<String>> getTimeoutTest() { final Uri $url = Uri.parse('/test/get_timeout'); final Request $request = Request( 'GET', $url, client.baseUrl, ); return client .send<String, String>($request) .timeout(const Duration(microseconds: 42000000)); }
Addresses #603 Addresses https://github.com/dart-lang/http/issues/1186
Codecov complaining .... as always.
@JEuler @Guldem @vladRudenua23 would you mind checking this PR 😇
This PR adds a new
timeout
annotationthat can be used like
and generates the following code
Addresses #603 Addresses https://github.com/dart-lang/http/issues/1186