Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.4.1"
".": "4.4.2"
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 4.4.2 (2025-07-11)

Full Changelog: [v4.4.1...v4.4.2](https://github.com/orbcorp/orb-python/compare/v4.4.1...v4.4.2)

### Bug Fixes

* **client:** don't send Content-Type header on GET requests ([958c8b9](https://github.com/orbcorp/orb-python/commit/958c8b911c0b66d54e7f384f8fc4a7096a550a44))


### Chores

* **readme:** fix version rendering on pypi ([ea7d8b3](https://github.com/orbcorp/orb-python/commit/ea7d8b30d3f960def16a2484720df085a87be756))

## 4.4.1 (2025-07-09)

Full Changelog: [v4.4.0...v4.4.1](https://github.com/orbcorp/orb-python/compare/v4.4.0...v4.4.1)
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Orb Python API library

[![PyPI version](<https://img.shields.io/pypi/v/orb-billing.svg?label=pypi%20(stable)>)](https://pypi.org/project/orb-billing/)
<!-- prettier-ignore -->
[![PyPI version](https://img.shields.io/pypi/v/orb-billing.svg?label=pypi%20(stable))](https://pypi.org/project/orb-billing/)

The Orb Python library provides convenient access to the Orb REST API from any Python 3.8+
application. The library includes type definitions for all request params and response fields,
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "orb-billing"
version = "4.4.1"
version = "4.4.2"
description = "The official Python library for the orb API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down Expand Up @@ -39,7 +39,7 @@ Homepage = "https://github.com/orbcorp/orb-python"
Repository = "https://github.com/orbcorp/orb-python"

[project.optional-dependencies]
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.6"]
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]

[tool.rye]
managed = true
Expand Down
11 changes: 9 additions & 2 deletions src/orb/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,15 @@ def _build_request(
# work around https://github.com/encode/httpx/discussions/2880
kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")}

is_body_allowed = options.method.lower() != "get"

if is_body_allowed:
kwargs["json"] = json_data if is_given(json_data) else None
kwargs["files"] = files
else:
headers.pop("Content-Type", None)
kwargs.pop("data", None)

# TODO: report this error to httpx
return self._client.build_request( # pyright: ignore[reportUnknownMemberType]
headers=headers,
Expand All @@ -541,8 +550,6 @@ def _build_request(
# so that passing a `TypedDict` doesn't cause an error.
# https://github.com/microsoft/pyright/issues/3526#event-6715453066
params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None,
json=json_data if is_given(json_data) else None,
files=files,
**kwargs,
)

Expand Down
2 changes: 1 addition & 1 deletion src/orb/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "orb"
__version__ = "4.4.1" # x-release-please-version
__version__ = "4.4.2" # x-release-please-version
4 changes: 2 additions & 2 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def test_request_extra_query(self) -> None:
def test_multipart_repeating_array(self, client: Orb) -> None:
request = client._build_request(
FinalRequestOptions.construct(
method="get",
method="post",
url="/foo",
headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
json_data={"array": ["foo", "bar"]},
Expand Down Expand Up @@ -1311,7 +1311,7 @@ def test_request_extra_query(self) -> None:
def test_multipart_repeating_array(self, async_client: AsyncOrb) -> None:
request = async_client._build_request(
FinalRequestOptions.construct(
method="get",
method="post",
url="/foo",
headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
json_data={"array": ["foo", "bar"]},
Expand Down