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

use POST requests with ReqBody #114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

quyse
Copy link
Contributor

@quyse quyse commented Feb 14, 2018

Currently getUpdates method ignores all input parameters, such as offset and timeout, so it's basically impossible to fetch updates (it returns the same updates over and over again). Seems like using GET HTTP method with request body is the problem. I'm not sure whether servant doesn't send request body data within GET request, or that request data is simply ignored in GET requests by Telegram servers. Anyway, changing HTTP method to POST fixes the problem.

I changed setWebhook method to POST as well (I didn't test it, as I don't use webhooks). All other requests in the library already use POST if ReqBody is present.

@quyse
Copy link
Contributor Author

quyse commented Feb 14, 2018

Probably it was broken in 9cf9985, when QueryParams were replaced with ReqBody but Get wasn't changed to Post.

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.

1 participant