Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Commit cd768e7

Browse files
committed
refactor: Remove superflous header (#127)
1 parent fc82f39 commit cd768e7

File tree

5 files changed

+1
-6
lines changed

5 files changed

+1
-6
lines changed

src/Platform/Anthropic.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ public function request(array $body): iterable
3030
$response = $this->httpClient->request('POST', 'https://api.anthropic.com/v1/messages', [
3131
'headers' => [
3232
'x-api-key' => $this->apiKey,
33-
'Content-Type' => 'application/json',
3433
'anthropic-version' => '2023-06-01',
3534
],
3635
'json' => $body,

src/Platform/OpenAI/Azure.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ protected function rawRequest(string $endpoint, array $body): ResponseInterface
2929
return $this->httpClient->request('POST', $url, [
3030
'headers' => [
3131
'api-key' => $this->apiKey,
32-
'Content-Type' => 'application/json',
3332
],
3433
'query' => ['api-version' => $this->apiVersion],
3534
'json' => $body,

src/Platform/OpenAI/OpenAI.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ protected function rawRequest(string $endpoint, array $body): ResponseInterface
2525

2626
return $this->httpClient->request('POST', $url, [
2727
'auth_bearer' => $this->apiKey,
28-
'headers' => ['Content-Type' => 'application/json'],
29-
'body' => json_encode($body),
28+
'json' => $body,
3029
]);
3130
}
3231
}

src/Platform/Voyage.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ public function __construct(
2222
public function request(array $body): array
2323
{
2424
$response = $this->httpClient->request('POST', 'https://api.voyageai.com/v1/embeddings', [
25-
'headers' => ['Content-Type' => 'application/json'],
2625
'auth_bearer' => $this->apiKey,
2726
'json' => $body,
2827
]);

src/Store/Azure/SearchStore.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ private function request(string $endpoint, array $payload): array
5454
$response = $this->httpClient->request('POST', $url, [
5555
'headers' => [
5656
'api-key' => $this->apiKey,
57-
'Content-Type' => 'application/json',
5857
],
5958
'query' => ['api-version' => $this->apiVersion],
6059
'json' => $payload,

0 commit comments

Comments
 (0)