{"action":"opened","issue":{"url":"https://api.github.com/repos/rubenlagus/TelegramBots/issues/563","repository_url":"https://api.github.com/repos/rubenlagus/TelegramBots","labels_url":"https://api.github.com/repos/rubenlagus/TelegramBots/issues/563/labels{/name}","comments_url":"https://api.github.com/repos/rubenlagus/TelegramBots/issues/563/comments","events_url":"https://api.github.com/repos/rubenlagus/TelegramBots/issues/563/events","html_url":"https://github.com/rubenlagus/TelegramBots/issues/563","id":393913821,"node_id":"MDU6SXNzdWUzOTM5MTM4MjE=","number":563,"title":"set webhook use proxy with auth","user":{"login":"vova-uvarov","id":671114,"node_id":"MDQ6VXNlcjY3MTExNA==","avatar_url":"https://avatars2.githubusercontent.com/u/671114?v=4","gravatar_id":"","url":"https://api.github.com/users/vova-uvarov","html_url":"https://github.com/vova-uvarov","followers_url":"https://api.github.com/users/vova-uvarov/followers","following_url":"https://api.github.com/users/vova-uvarov/following{/other_user}","gists_url":"https://api.github.com/users/vova-uvarov/gists{/gist_id}","starred_url":"https://api.github.com/users/vova-uvarov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vova-uvarov/subscriptions","organizations_url":"https://api.github.com/users/vova-uvarov/orgs","repos_url":"https://api.github.com/users/vova-uvarov/repos","events_url":"https://api.github.com/users/vova-uvarov/events{/privacy}","received_events_url":"https://api.github.com/users/vova-uvarov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-24T17:31:01Z","updated_at":"2018-12-24T17:31:01Z","closed_at":null,"author_association":"NONE","body":"`\r\n            HttpContext httpContext = options.getHttpContext();\r\n\r\n                CredentialsProvider credsProvider = (CredentialsProvider) httpContext.getAttribute(\"http.auth.credentials-provider\");\r\n                if (credsProvider == null) {\r\n                    credsProvider = new BasicCredentialsProvider();\r\n                    httpContext.setAttribute(\"http.auth.credentials-provider\", credsProvider);\r\n                }\r\n                UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(\"myProxyLoging\", \"myProxyPassword\");\r\n                credsProvider.setCredentials(new AuthScope(\"myProxyHost\" 1234), credentials);\r\n          \r\n\r\n            options.setRequestConfig(\r\n                    RequestConfig.copy(RequestConfig.DEFAULT)\r\n                            .setProxy(new HttpHost(\"myProxyHost\", 1234))\r\n                            .build()\r\n            );\r\n`\r\n\r\nif use this config for LongpoolingTelegramBot everything works perfectly.\r\nif i'm use this config for TelegramWebhookBot I get an error (407 Proxy Authentication Required ) when setWebhook (org.telegram.telegrambots.util.WebhookUtils#setWebhook)\r\n\r\nThe error occurs because in rg.telegram.telegrambots.util.WebhookUtils#setWebhook\r\nwhen calling try (CloseableHttpResponse response = httpclient.**execute(httppost)**) \r\nnot passed HttpContext \r\n\r\nherewith  in org.telegram.telegrambots.bots.DefaultAbsSender#sendHttpPostRequest\r\ncall\r\n\r\ntry (CloseableHttpResponse response = httpClient.execute(httppost, **options.getHttpContext()**)) {\r\n\r\n\r\n"}}
{"actor":{"display_login":"vova-uvarov"}}