Skip to content

Commit

Permalink
fix(api): remove static Content-Type header with wrong value on some …
Browse files Browse the repository at this point in the history
…requests

The correct value is handled automatically by the requests library, only needed to be specified manually under specific circumstances
  • Loading branch information
YisusChrist committed Jan 22, 2025
1 parent 35019ac commit d6d14b5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions creatio_api_py/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,7 @@ def _store_session_cookie(self, username: str) -> None:

def _build_headers(self, endpoint: str, method: str) -> dict[str, str]:
"""Construct request headers."""
headers: dict[str, str] = {
"Content-Type": "application/json",
"ForceUseSession": "true",
}
headers: dict[str, str] = {"ForceUseSession": "true"}

if "$metadata" not in endpoint:
headers["Accept"] = "application/json; odata=verbose"
Expand Down

0 comments on commit d6d14b5

Please sign in to comment.