Skip to content

Commit 34be29e

Browse files
committed
fix missing await
1 parent 8a55e70 commit 34be29e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

templates/dart/lib/client.dart.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,17 @@ class Client {
8080
try {
8181

8282
if(headers['content-type'] == 'multipart/form-data') {
83-
return http.request(path, data: FormData.fromMap(params), options: options);
83+
return await http.request(path, data: FormData.fromMap(params), options: options);
8484
}
8585

8686
if (method == HttpMethod.get) {
8787
params.keys.forEach((key) {if (params[key] is int || params[key] is double) {
8888
params[key] = params[key].toString();
8989
}});
9090

91-
return http.get(path, queryParameters: params, options: options);
91+
return await http.get(path, queryParameters: params, options: options);
9292
} else {
93-
return http.request(path, data: params, options: options);
93+
return await http.request(path, data: params, options: options);
9494
}
9595
} on DioError catch(e) {
9696
if(e.response == null) {

0 commit comments

Comments
 (0)