Skip to content

Commit 12acdd3

Browse files
hive-botclaude
andcommitted
docs: describe the headers option precisely
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 5c562bc commit 12acdd3

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

‎deepl/admin_client.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,11 @@ class DeepLAdminClient(BaseClient):
4949
of a request. If None, the deprecated
5050
deepl.http_client.min_connection_timeout is used (default 10.0).
5151
:param headers: (Optional) Additional HTTP headers sent with every
52-
request to the DeepL API. A User-Agent header replaces the one the
53-
library generates. An Authorization header is ignored.
52+
request to the DeepL API. A header replaces the library's header of
53+
the same name (compared case-insensitively), including User-Agent
54+
and Authorization; Content-Type, Content-Length, Transfer-Encoding,
55+
Host and an Accept the library sets for a call keep the library's
56+
value.
5457
:param app_info: (Optional) AppInfo identifying your application in the
5558
User-Agent header, same as set_app_info().
5659

‎deepl/translator.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,11 @@ class Translator(BaseClient):
145145
of a request. If None, the deprecated
146146
deepl.http_client.min_connection_timeout is used (default 10.0).
147147
:param headers: (Optional) Additional HTTP headers sent with every
148-
request to the DeepL API. A User-Agent header replaces the one the
149-
library generates. An Authorization header is ignored.
148+
request to the DeepL API. A header replaces the library's header of
149+
the same name (compared case-insensitively), including User-Agent
150+
and Authorization; Content-Type, Content-Length, Transfer-Encoding,
151+
Host and an Accept the library sets for a call keep the library's
152+
value.
150153
:param app_info: (Optional) AppInfo identifying your application in the
151154
User-Agent header, same as set_app_info().
152155
:param skip_language_check: Deprecated, and now has no effect as the

0 commit comments

Comments
 (0)