call method
Implementation
Future<Response> call(
HttpMethod method, {
String path = '',
Map<String, String> headers = const {},
Map<String, dynamic> params = const {},
ResponseType? responseType,
}) async {
late http.Response res;
http.BaseRequest request = this.prepareRequest(
method,
uri: Uri.parse(_endPoint + path),
headers: {...this._headers!, ...headers},
params: params,
);
try {
final streamedResponse = await _httpClient.send(request);
res = await toResponse(streamedResponse);
return this.prepareResponse(
res,
responseType: responseType,
);
} catch (e) {
if (e is TombaException) {
throw e;
}
throw TombaException(e.toString());
}
}