sendRequest method
sends the request to the specified url
Implementation
Future<String> sendRequest(Uri url) async {
http.Response response = await http.get(url);
if (response.statusCode != 200) {
throw Exception('Failed to fetch data from Aare.guru API, '
'status code: ${response.statusCode} ${response.reasonPhrase}');
}
print(response.request?.url);
return response.body;
}