Skip to content

Commit f9b7866

Browse files
committed
set Content-Type header for bulk create requests
1 parent 623f8ea commit f9b7866

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/bubble_data_api_client/transport.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,15 @@ async def request(
6464
content: str | None = None,
6565
json: typing.Any = None,
6666
params: dict[str, str] | None = None,
67+
headers: dict[str, str] | None = None,
6768
) -> httpx.Response:
6869
response: httpx.Response = await self._http.request(
6970
method=method,
7071
url=url,
7172
content=content,
7273
json=json,
7374
params=params,
75+
headers=headers,
7476
)
7577
response.raise_for_status()
7678
return response
@@ -96,4 +98,9 @@ async def post(self, url: str, json: typing.Any) -> httpx.Response:
9698
return await self.request(method="POST", url=url, json=json)
9799

98100
async def post_text(self, url: str, content: str) -> httpx.Response:
99-
return await self.request(method="POST", url=url, content=content)
101+
return await self.request(
102+
method="POST",
103+
url=url,
104+
content=content,
105+
headers={"Content-Type": "text/plain"},
106+
)

0 commit comments

Comments
 (0)