def _connect(self):
        self._connection.connect()

        full_path = None

        try:
            full_path = self.path + '?' + urllib.urlencode(self.query_parameters)
        except __HOLE__:
            full_path = self.path + '?' + urllib.parse.urlencode(self.query_parameters)

        self._connection.putrequest('POST', full_path, skip_accept_encoding=1)

        headers = {
            'Accept': 'application/json',
            'Authorization': ('Bearer %s' % self.client_access_token)
        }

        headers.update(self._prepare_headers())

        for header_key, header_value in headers.items():
            self._connection.putheader(header_key, header_value)

        self._connection.endheaders()

        begin = self._prepage_begin_request_data()

        if not begin is None:
            self.send(begin.encode('utf-8'))
dataset/ETHPy150Open api-ai/api-ai-python/apiai/requests/request.py/Request._connect