get<ResponseType> method

Future<ResponseType> get<ResponseType>(
  1. String path, {
  2. Map<String, String>? query,
  3. Map<String, String>? headers,
  4. JsonDeserializer<ResponseType>? responseDeserializer,
})

Performs an HTTP GET api call.

path is appended to baseUrl to determine the API endpoint.

The return value is the result of passing the response's JSON-decoded body to responseDeserializer. If responseDeserializer is null, null will be returned.

Implementation

Future<ResponseType> get<ResponseType>(
  String path, {
  Map<String, String>? query,
  Map<String, String>? headers,
  JsonDeserializer<ResponseType>? responseDeserializer,
}) async {
  query ??= const {};
  return send<ResponseType>(
    _newApiRequest('get', path, query: query),
    headers: headers,
    responseDeserializer: responseDeserializer,
  );
}