Fix bug when setting webhook

This commit is contained in:
Ruben Bermudez 2017-05-29 00:31:24 +02:00
parent 96760f48c1
commit 73958b06e4

View File

@ -45,7 +45,7 @@ public abstract class TelegramWebhookBot extends DefaultAbsSender implements Web
@Override @Override
public void setWebhook(String url, String publicCertificatePath) throws TelegramApiRequestException { public void setWebhook(String url, String publicCertificatePath) throws TelegramApiRequestException {
try (CloseableHttpClient httpclient = HttpClientBuilder.create().setSSLHostnameVerifier(new NoopHostnameVerifier()).build()) { try (CloseableHttpClient httpclient = HttpClientBuilder.create().setSSLHostnameVerifier(new NoopHostnameVerifier()).build()) {
String requestUrl = getBaseUrl() + getBotToken() + "/" + SetWebhook.PATH; String requestUrl = getBaseUrl() + SetWebhook.PATH;
HttpPost httppost = new HttpPost(requestUrl); HttpPost httppost = new HttpPost(requestUrl);
httppost.setConfig(botOptions.getRequestConfig()); httppost.setConfig(botOptions.getRequestConfig());