def is_response_to_head(response):
    # FIXME: Can we do this somehow without accessing private httplib _method?
    method = response._method
    if isinstance(method, int):  # Platform-specific: Appengine
        return method == 3
    return method.upper() == 'HEAD'
Checks whether the request of a response has been a HEAD-request.
dataset/ETHPy150Open kennethreitz/requests/requests/packages/urllib3/util/response.py/is_response_to_head