head function
Sends an HTTP HEAD request with the given headers to the given URL.
Implementation
Future<Response> head(String url, {Map<String, String>? headers}) async {
http_request.Response apiResponse =
await http_request.get(Uri.parse(url), headers: headers);
return Response(
apiResponse.statusCode,
apiResponse.body,
apiResponse.bodyBytes,
apiResponse.contentLength,
apiResponse.headers,
apiResponse.isRedirect,
apiResponse.persistentConnection,
apiResponse.reasonPhrase,
apiResponse.request);
}