Send a HEAD request. See requests.sessions.request for optional parameters.

        :returns: Response object
510074
def HEAD(self, rest_path_list, **kwargs):
        
        kwargs.setdefault("allow_redirects", False)
        return self._request("HEAD", rest_path_list, **kwargs)
907001
def head(self, url, *args, **kwargs):
        
        with LOG_JWS_HEAD().context():
            return DeferredContext(
                self._send_request(u'HEAD', url, *args, **kwargs)
                ).addActionFinish()
888890
def request(self, method, url, **kwargs):
        
        if 'timeout' not in kwargs:
            if self.timeout is not None:
                kwargs['timeout'] = self.timeout
            else:
                kwargs['timeout'] = (DEFAULT_CONNECT_TIMEOUT,
                                     DEFAULT_READ_TIMEOUT)
        return super(Session, self).request(method=method, url=url, **kwargs)
25182
def setup_request_sessions(self):
        
        self.req_session = requests.Session()
        self.req_session.headers.update(self.headers)
2155
def head_object(self, bucket, object_name):
        
        details = self._details(
            method=b"HEAD",
            url_context=self._url_context(bucket=bucket, object_name=object_name),
        )
        d = self._submit(self._query_factory(details))
        d.addCallback(lambda (response, body): _to_dict(response.responseHeaders))
        return d
963805
def http_session(self):
        
        if self._http_session is None:
            session = VerboseHTTPSession()
            session.headers.update(self.DEFAULT_HTTP_HEADERS)
            self._http_session = session
        return self._http_session
698280
def request(self, path, method='GET', headers=None, **kwargs):
        
        headers = {} if headers is None else headers.copy()
        headers["User-Agent"] = "Bugsy"
        kwargs['headers'] = headers
        url = '%s/%s' % (self.bugzilla_url, path)
        return self._handle_errors(self.session.request(method, url, **kwargs))
124247
def head(self, url, *args, **kwargs):
        
        res = self._conn.head(url, headers=self._prepare_headers(**kwargs))
        if res.status_code == 200:
            return res
        return None
479381
def requests_session(self, *args, **kwargs):
        
        import requests
        auth1 = self.generate_auth()
        return requests.Session(*args, auth=auth1, **kwargs)
427221
def request(self, method, url, **kwargs):
        
        auth = None
        if self._username is not None and self._password is not None:
            auth = (self._username, self._password)

        return super(BasicSession, self).request(
            method, url, auth=auth, **kwargs)
576731
def head(query_url,
             headers: {})
      HttpRequest.new(HttpMethodEnum::HEAD,
                      query_url,
                      headers: headers)
    end
969413
def do(self):
        
        data = None
        if self.body is not None and self.body != b'':
            data = self.body
        return requests.request(self.method, str(self.url), data=data, headers=self.header)
287758
def _make_request(self, method, url, post_data=None, body=None):
        
        if not self.connection:
            self._connect()
        try:
            self.connection.close()
        except:
            pass
        self.connection.connect()
        headers = {}
        if self.auth_header:
            headers["Authorization"] = self.auth_header
        self.connection.request(method, url, body, headers)
        resp = self.connection.getresponse()
        return resp
358790
def _send_request(self, request, **kwargs):
        """"""
        log.debug(LOG_CHECK, "Send request %s with %s", request, kwargs)
        log.debug(LOG_CHECK, "Request headers %s", request.headers)
        self.url_connection = self.session.send(request, **kwargs)
        self.headers = self.url_connection.headers
        self._add_ssl_info()
230549
def request(self, *args, **kwargs):
        
        return self.session.request(*args, **self.get_kwargs(**kwargs))
1328906
def send_message(
        self, request: str, response_expected: bool, **kwargs: Any
    ) -> Response:
        
        response = self.session.post(self.endpoint, data=request.encode(), **kwargs)
        return Response(response.text, raw=response)
433072
def _delete_request(self, url, headers, data=None):
        
        return self._session.delete(url, headers=headers, data=data)