head method

Future<Response> head({
  1. required Uri url,
  2. dynamic headers,
})

Implementation

Future<http.Response> head({required Uri url, headers}) async {
  http.Response response = await _client.head(url, headers: headers);

  if (!_isSuccessStatus(response.statusCode)) {
    throw Exception(
      "error fetching STATUS: ${response.statusCode}, ${response.body}, Link: $url",
    );
  }

  return response;
}