code: def __request(self, method, endpoint, data, params=None, **kwargs):
          
          if params is None:
              params = {}
          url = self.__get_url(endpoint)
          auth = None
          headers = {
              "user-agent": "WooCommerce API Client-Python/%s" % __version__,
              "accept": "application/json"
          }
  
          if self.is_ssl is True and self.query_string_auth is False:
              auth = (self.consumer_key, self.consumer_secret)
          elif self.is_ssl is True and self.query_string_auth is True:
              params.update({
                  "consumer_key": self.consumer_key,
                  "consumer_secret": self.consumer_secret
              })
          else:
              encoded_params = urlencode(params)
              url = "%s?%s" % (url, encoded_params)
              url = self.__get_oauth_url(url, method, **kwargs)
  
          if data is not None:
              data = jsonencode(data, ensure_ascii=False).encode('utf-8')
              headers["content-type"] = "application/json;charset=utf-8"
  
          return request(
              method=method,
              url=url,
              verify=self.verify_ssl,
              auth=auth,
              params=params,
              data=data,
              timeout=self.timeout,
              headers=headers,
              **kwargs
          )
docs: Do requests