apiCall method
Implementation
Future<Response> apiCall(NetworkState state) async {
Uri finalEndpoint = endpoint(state.https, getFinalEndpoint(url, state));
print("POST $finalEndpoint");
return await post(
finalEndpoint,
body: json != null ? json : jsonEncode(body),
headers: headers(state),
encoding: Encoding.getByName("application/json"),
);
}