apiGetJson method

Future apiGetJson(
  1. String endpoint, {
  2. Map<String, String>? headers,
})

Returns the body decoded as JSON of the given endpoint in the specified RestAPI after a GET request. To proper use, specify apiBaseUrl.

Implementation

Future<dynamic> apiGetJson(
  String endpoint, {
  Map<String, String>? headers,
}) async =>
    json.decode(await apiGet(endpoint, headers: headers));