getJson method
Sends a GET request to the specified url and returns the response as a
JSON object.
Implementation
Future<(http.Response, dynamic)> getJson(
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.bodyJson);
}