Closed denred0 closed 7 years ago
You doing all right. Most probably its something with your proxy server, for example it is SOCKS proxy. This library supports only HTTP proxy.
@flicus i have https proxy server. Is It mean no way to use this library for https proxy server?
The new version allows to set custom RequestConfig, that should give a better way of setting up proxis (hope)
Was this solved with las version @DenisWpk ?
Hi! I use your cool library, but i dont understand how correctly use it with proxy. I read all issues about it but dont find solution.
I use TelegramLongPollingBot and folowing code: TelegramBotsApi telegramBotsApi = new TelegramBotsApi(); TelegramLongPollingBot bot = new MainBot(); bot.getOptions().setProxyHost("10.40.40.19"); bot.getOptions().setProxyPort(3128);
I get error
org.telegram.telegrambots.exceptions.TelegramApiRequestException: Error deserializing setWebhook method response at org.telegram.telegrambots.TelegramBotsApi.setWebhook(TelegramBotsApi.java:164) at org.telegram.telegrambots.TelegramBotsApi.setWebhook(TelegramBotsApi.java:181) at org.telegram.telegrambots.TelegramBotsApi.registerBot(TelegramBotsApi.java:98) at contactBot.MainBot.main(MainBot.java:57) Caused by: org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
What do I wrong? Thank you for help.