getURL function

Future<HttpResponse> getURL(
  1. String url, {
  2. HttpClient? client,
  3. String? method,
})

Implementation

Future<HttpResponse> getURL(String url, {HttpClient? client, String? method}) {
  method ??= 'GET';
  var httpMethod = getHttpMethod(method) ?? HttpMethod.GET;

  client ??= HttpClient(url);

  return client.requestURL(httpMethod, url);
}