Skip to content

Commit

Permalink
Change headers in post back to default to None
Browse files Browse the repository at this point in the history
  • Loading branch information
waddahAldrobi committed Mar 19, 2024
1 parent 4e11311 commit 642cc49
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions dune_client/api/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down

0 comments on commit 642cc49

Please sign in to comment.