fetchJSON static method
Fetches the specified url from HTTP as json.
If headers is specified, the headers will be added onto the request.
Implementation
static Future<dynamic> fetchJSON(
String url, {
Map<String, String>? headers,
}) async {
return const JsonDecoder().convert(await fetchUrl(url, headers: headers));
}