get method

Future<Response> get(
  1. Uri url, {
  2. Duration timeout = const Duration(seconds: 30),
  3. Map<String, String>? headers,
})

Sends a GET request to the specified url.

Implementation

Future<http.Response> get(
  Uri url, {
  Duration timeout = const Duration(seconds: 30),
  Map<String, String>? headers,
}) async {
  return await http
      .get(url, headers: headers)
      .handleExceptions(timeout: timeout);
}