getBytes method
Sends a GET request to the specified url and returns the response as a
Uint8List.
Implementation
Future<(http.Response, Uint8List)> getBytes(
Uri url, {
Duration timeout = const Duration(seconds: 30),
Map<String, String>? headers,
}) async {
final response = await http
.get(url, headers: headers)
.handleExceptions(timeout: timeout);
return (response, response.bodyBytes);
}