mirror of
https://github.com/anomalyco/opencode-sdk-python.git
synced 2026-07-26 09:25:30 +00:00
Merge 356edf427a into 817f1a0816
This commit is contained in:
commit
66a55a1220
1 changed files with 3 additions and 0 deletions
|
|
@ -537,6 +537,9 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|||
else:
|
||||
kwargs["json"] = json_data if is_given(json_data) else None
|
||||
kwargs["files"] = files
|
||||
# Don't send Content-Type when there's no body content
|
||||
if not is_given(json_data) and not files:
|
||||
headers.pop("Content-Type", None)
|
||||
else:
|
||||
headers.pop("Content-Type", None)
|
||||
kwargs.pop("data", None)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue