Skip to content

Commit 4e082de

Browse files
author
Mateusz Dębiński
committed
Merge remote-tracking branch 'origin/4.6'
2 parents 8f04639 + aa0499d commit 4e082de

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib/Client/Deepl.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public function setConfiguration(array $configuration): void
6161
public function translate(string $payload, ?string $from, string $to): string
6262
{
6363
$parameters = [
64-
'auth_key' => $this->authKey,
6564
'target_lang' => $this->normalized($to),
6665
'tag_handling' => 'xml',
6766
'text' => $payload,
@@ -77,6 +76,9 @@ public function translate(string $payload, ?string $from, string $to): string
7776
[
7877
'base_uri' => 'https://api.deepl.com',
7978
'timeout' => 5.0,
79+
'headers' => [
80+
'Authorization' => 'DeepL-Auth-Key ' . $this->authKey,
81+
],
8082
]
8183
);
8284
$response = $http->post('/v2/translate', ['form_params' => $parameters]);

0 commit comments

Comments
 (0)