jnpr/space/rest.py
def head(self, url, headers={}):
        """Performs an HTTP HEAD on the given url. Acts as a wrapper over
        requests.head() function.

        :param str url: URL for performing HEAD
        :param dict headers: A dict with the headers that need to be sent with
            the HEAD request. Defaults to ``{}``.

        :returns:  The response object (`requests.Response <http://docs.python-requests.org/en/latest/api/#requests.Response />`_)
            returned by the HEAD request.
        """
        req_url = self.space_url + url
        self._logger.debug("HEAD %s", req_url)
        self._logger.debug(headers)
        if self._use_session:
            resp = self._connection.get_session().head(req_url,
                                                       headers=headers,
                                                       verify=False)
        else:
            if self.cert is not None:
                resp = requests.head(req_url,
                                     cert=self.cert,
                                     headers=headers,
                                     verify=False)
            else:
                resp = requests.head(req_url,
                                     auth=(self.space_user, self.space_passwd),
                                     headers=headers,
                                     verify=False)
        self._logger.debug(resp)
        self._logger.debug(resp.headers)
        self._logger.debug(resp.cookies)
        self._logger.debug(resp.text)
        self._log_time('HEAD', url, resp)
        return resp
Performs an HTTP HEAD on the given url. Acts as a wrapper over
        requests.head() function.

        :param str url: URL for performing HEAD
        :param dict headers: A dict with the headers that need to be sent with
            the HEAD request. Defaults to ``{}``.

        :returns:  The response object (`requests.Response <http://docs.python-requests.org/en/latest/api/#requests.Response />`_)
            returned by the HEAD request.
        
Performs an HTTP HEAD on the given url. Acts as a wrapper over
requests.head() function.
Performs an HTTP HEAD on the given url . Acts as a wrapper over requests . head () function .
def head(self, url, headers={}):
        req_url = self.space_url + url
        self._logger.debug("HEAD %s", req_url)
        self._logger.debug(headers)
        if self._use_session:
            resp = self._connection.get_session().head(req_url,
                                                       headers=headers,
                                                       verify=False)
        else:
            if self.cert is not None:
                resp = requests.head(req_url,
                                     cert=self.cert,
                                     headers=headers,
                                     verify=False)
            else:
                resp = requests.head(req_url,
                                     auth=(self.space_user, self.space_passwd),
                                     headers=headers,
                                     verify=False)
        self._logger.debug(resp)
        self._logger.debug(resp.headers)
        self._logger.debug(resp.cookies)
        self._logger.debug(resp.text)
        self._log_time('HEAD', url, resp)
        return resp
def head ( self , url , headers = { } ) : req_url = self . space_url + url self . _logger . debug ( "HEAD %s" , req_url ) self . _logger . debug ( headers ) if self . _use_session : resp = self . _connection . get_session ( ) . head ( req_url , headers = headers , verify = False ) else : if self . cert is not None : resp = requests . head ( req_url , cert = self . cert , headers = headers , verify = False ) else : resp = requests . head ( req_url , auth = ( self . space_user , self . space_passwd ) , headers = headers , verify = False ) self . _logger . debug ( resp ) self . _logger . debug ( resp . headers ) self . _logger . debug ( resp . cookies ) self . _logger . debug ( resp . text ) self . _log_time ( 'HEAD' , url , resp ) return resp
Performs an HTTP HEAD on the given url.
Performs an HTTP HEAD on the given url .
"""Performs an HTTP HEAD on the given url. Acts as a wrapper over
        requests.head() function.

        :param str url: URL for performing HEAD
        :param dict headers: A dict with the headers that need to be sent with
            the HEAD request. Defaults to ``{}``.

        :returns:  The response object (`requests.Response <http://docs.python-requests.org/en/latest/api/#requests.Response />`_)
            returned by the HEAD request.
        """
The response object (`requests.Response `_)
returned by the HEAD request.
The response object ( ` requests . Response ` _ ) returned by the HEAD request .
self
url
URL for performing HEAD
URL for performing HEAD
headers
A dict with the headers that need to be sent with
the HEAD request.
A dict with the headers that need to be sent with the HEAD request .