code: def _request(self, path, key, data, method, key_is_cik, extra_headers={}):
          if method == 'GET':
              if len(data) > 0:
                  url = path + '?' + data
              else:
                  url = path
              body = None
          else:
              url = path
              body = data
          headers = {}
          if key_is_cik:
              headers['X-Exosite-CIK'] = key
          else:
              headers['X-Exosite-Token'] = key
          if method == 'POST':
              headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8'
          headers['Accept'] = 'text/plain, text/csv, application/x-www-form-urlencoded'
          headers.update(extra_headers)
          body, response = self._onephttp.request(method,
                                                  url,
                                                  body,
                                                  headers)
          pr = ProvisionResponse(body, response)
          if self._raise_api_exceptions and not pr.isok:
              raise ProvisionException(pr)
          return pr