Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(yandex,curl): fixed yandex v2, changes to curl #18

Merged
merged 2 commits into from
Jul 27, 2023
Merged

fix(yandex,curl): fixed yandex v2, changes to curl #18

merged 2 commits into from
Jul 27, 2023

Conversation

infastin
Copy link
Contributor

@infastin infastin commented Jul 21, 2023

Yandex Translator API v2 wasn't working. This PR fixes that. Part of the problem was that the API accepts JSON (as i think), so now if any engine sets Content-Type header equal to "application/json", curl will create a request with a valid JSON body instead of passing data as plain parameters.

Now curl will automatically generate json data if Content-Type is application/json.
@potamides
Copy link
Owner

Thank you for testing the Yandex endpoint (issue #1) and providing a pull request!

lua/pantran/curl.lua Outdated Show resolved Hide resolved
@potamides potamides merged commit c0d2844 into potamides:main Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants