callFunction method
Implementation
Future<http.Response> callFunction(
Uri url, {
Map<String, String>? headers,
Object? body,
}) {
switch (this) {
case HttpClientRequestType.get:
return http.get(url, headers: headers);
case HttpClientRequestType.post:
return http.post(url, headers: headers, body: body);
case HttpClientRequestType.put:
return http.put(url, headers: headers, body: body);
case HttpClientRequestType.delete:
return http.delete(url, headers: headers, body: body);
}
}