Skip to content

Commit

Permalink
fix: insert default content type header
Browse files Browse the repository at this point in the history
  • Loading branch information
leynier committed Oct 18, 2022
1 parent 6ffa532 commit 332f782
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gotrue/_async/gotrue_base_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ async def _request(
) -> Union[T, None]:
url = f"{self._url}/{path}"
headers = {**self._headers, **(headers or {})}
if "Content-Type" not in headers:
headers["Content-Type"] = "application/json;charset=UTF-8"
if jwt:
headers["Authorization"] = f"Bearer {jwt}"
query = query or {}
Expand Down
2 changes: 2 additions & 0 deletions gotrue/_sync/gotrue_base_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ def _request(
) -> Union[T, None]:
url = f"{self._url}/{path}"
headers = {**self._headers, **(headers or {})}
if "Content-Type" not in headers:
headers["Content-Type"] = "application/json;charset=UTF-8"
if jwt:
headers["Authorization"] = f"Bearer {jwt}"
query = query or {}
Expand Down

0 comments on commit 332f782

Please sign in to comment.