@@ -17,22 +17,22 @@ Future<Schedule> postSchedule(Schedule schedule) async {
17
17
final uri = Uri .http (apiUrl, '$scheduleEndpoint ' );
18
18
final response = await httpClient.put (uri,
19
19
headers: applicationJsonHeader,
20
- body: jsonEncode (serialize <Schedule >(schedule))). timeout (timeout) ;
20
+ body: jsonEncode (serialize <Schedule >(schedule)));
21
21
_expectResponseCode (201 , response);
22
22
return deserialize <Schedule >(jsonDecode (response.body));
23
23
}
24
24
25
25
Future <List <Schedule >> getSchedules () async {
26
26
final uri = Uri .http (apiUrl, scheduleEndpoint);
27
- final response = await httpClient.get (uri). timeout (timeout) ;
27
+ final response = await httpClient.get (uri);
28
28
_expectResponseCode (200 , response);
29
29
// Use the compute function to run parseSchedules in a separate isolate.
30
30
return compute (_parseSchedules, response.body);
31
31
}
32
32
33
33
Future <Schedule > getSchedule (String id) async {
34
34
final uri = Uri .http (apiUrl, '$scheduleEndpoint /$id ' );
35
- final response = await httpClient.get (uri). timeout (timeout) ;
35
+ final response = await httpClient.get (uri);
36
36
_expectResponseCode (200 , response);
37
37
return deserialize <Schedule >(jsonDecode (response.body));
38
38
}
@@ -41,14 +41,14 @@ Future<Schedule> putSchedule(Schedule schedule, String id) async {
41
41
final uri = Uri .http (apiUrl, '$scheduleEndpoint /$id ' );
42
42
final response = await httpClient.put (uri,
43
43
headers: applicationJsonHeader,
44
- body: jsonEncode (serialize <Schedule >(schedule))). timeout (timeout) ;
44
+ body: jsonEncode (serialize <Schedule >(schedule)));
45
45
_expectResponseCode (200 , response);
46
46
return deserialize <Schedule >(jsonDecode (response.body));
47
47
}
48
48
49
49
Future <Schedule > deleteSchedule (Schedule schedule, String id) async {
50
50
final uri = Uri .http (apiUrl, '$scheduleEndpoint /$id ' );
51
- final response = await httpClient.delete (uri). timeout (timeout) ;
51
+ final response = await httpClient.delete (uri);
52
52
_expectResponseCode (200 , response);
53
53
return deserialize <Schedule >(jsonDecode (response.body));
54
54
}
0 commit comments