Current DeepL map for language/translate is broken, basic request returns 400. It looks like DeepL stopped accepting payload in query parameters, and requires data to be passed in body.
Furthermore, it's not possible to use DeepL API Pro in current map, so I've added new SUBDOMAIN parameter. It defaults to api-free for the free API.
One caveat though: DeepL defines the following authentication schema in HTTP header:
Authorization: DeepL-Auth-Key [yourAuthKey]
However, we don't have any schema which allows formatting the Authorization header. Luckily the currently used scheme with auth_key query parameter works, but it's not documented and probably shouldn't be used.
Motivation and Context
Reported by user on Discord.
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
This PR changes the
deepl
provider!Description
Current DeepL map for
language/translate
is broken, basic request returns 400. It looks like DeepL stopped accepting payload in query parameters, and requires data to be passed in body.Furthermore, it's not possible to use DeepL API Pro in current map, so I've added new
SUBDOMAIN
parameter. It defaults toapi-free
for the free API.One caveat though: DeepL defines the following authentication schema in HTTP header:
However, we don't have any schema which allows formatting the Authorization header. Luckily the currently used scheme with
auth_key
query parameter works, but it's not documented and probably shouldn't be used.Motivation and Context
Reported by user on Discord.
Types of changes
Checklist: