get method

  1. @override
Future<Response> get(
  1. Uri url, {
  2. Map<String, String>? headers,
})
override

Sends an HTTP GET request with the given headers to the given URL. It checks first to see if there is a client, if there is it uses the client assuming it has authorization information, otherwise it calls the newHeaders method to obtain headers and makes the request

Implementation

@override
Future<http.Response> get(Uri url, {Map<String, String>? headers}) async =>
    client == null
        ? await http.get(
            url,
            headers: await newHeaders(headers),
          )
        : await client!.get(
            url,
            headers: headers,
          );