diff --git a/dune_client/api/base.py b/dune_client/api/base.py index 99f5c0d..c00b016 100644 --- a/dune_client/api/base.py +++ b/dune_client/api/base.py @@ -184,16 +184,15 @@ def _post( route: str, params: Optional[Any] = None, data: Optional[IO[bytes]] = None, - headers: Dict[str, str] = {}, + headers: Optional[Dict[str, str]] = None, ) -> Any: - # pylint: disable=dangerous-default-value """Generic interface for the POST method of a Dune API request""" url = self._route_url(route) self.logger.debug(f"POST received input url={url}, params={params}") response = self.http.post( url=url, json=params, - headers=dict(self.default_headers(), **headers), + headers=dict(self.default_headers(), **headers if headers else {}), timeout=self.request_timeout, data=data, )