def _api_head(self, url):
        """Make a HEAD request to the Review Board Gateway API.

        Delegate to the client's http_request function using the method
        HEAD but first add a PRIVATE-TOKEN in the header for authentication.
        """
        try:
            data, headers = self.client.http_request(
                url,
                headers={
                    'PRIVATE-TOKEN': self._get_private_token(),
                },
                method='HEAD')

            return headers
        except __HOLE__ as e:
            if e.code == 401:
                raise AuthorizationError(
                    ugettext('The login or password is incorrect.'))
            elif e.code == 404:
                raise
            else:
                logging.warning('Failed to execute a HEAD request at %s: %s',
                                url, e, exc_info=1)
                raise
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/hostingsvcs/rbgateway.py/ReviewBoardGateway._api_head