# com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor - docs

docs / com.github.insanusmokrassar.TelegramBotAPI.utils.extensions / com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor

### Extensions for com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor

(jvm)

#### setWebhook

Reverse proxy webhook.

`suspend fun RequestsExecutor.setWebhook(url: String, port: Int, engineFactory: ApplicationEngineFactory<*, *>, listenHost: String = "0.0.0.0", listenRoute: String = "/", certificate: InputFile? = null, privateKeyConfig: WebhookPrivateKeyConfig? = null, scope: CoroutineScope = CoroutineScope(Executors.newFixedThreadPool(4).asCoroutineDispatcher()), allowedUpdates: List<String>? = null, maxAllowedConnections: Int? = null, exceptionsHandler: (suspend (Exception) -> Unit)? = null, block: UpdateReceiver<Update>): Job` `suspend fun RequestsExecutor.setWebhook(url: String, port: Int, engineFactory: ApplicationEngineFactory<*, *>, listenHost: String = "0.0.0.0", listenRoute: String = "/", certificate: InputFile? = null, privateKeyConfig: WebhookPrivateKeyConfig? = null, scope: CoroutineScope = CoroutineScope(Executors.newFixedThreadPool(4).asCoroutineDispatcher()), allowedUpdates: List<String>? = null, maxAllowedConnections: Int? = null, block: UpdateReceiver<Update>): Job`
`suspend fun RequestsExecutor.setWebhook(url: String, port: Int, engineFactory: ApplicationEngineFactory<*, *>, certificate: InputFile? = null, privateKeyConfig: WebhookPrivateKeyConfig? = null, scope: CoroutineScope = CoroutineScope(Executors.newFixedThreadPool(4).asCoroutineDispatcher()), allowedUpdates: List<String>? = null, maxAllowedConnections: Int? = null, block: UpdateReceiver<Update>): Job`
`suspend fun RequestsExecutor.setWebhook(url: String, port: Int, filter: UpdatesFilter, engineFactory: ApplicationEngineFactory<*, *>, certificate: InputFile? = null, privateKeyConfig: WebhookPrivateKeyConfig? = null, scope: CoroutineScope = CoroutineScope(Executors.newFixedThreadPool(4).asCoroutineDispatcher()), maxAllowedConnections: Int? = null, listenHost: String = certificate ?.let { "0.0.0.0" } ?: "localhost", listenRoute: String = "/"): Job`