//[docs](../../../index.md)/[dev.inmo.tgbotapi.bot](../index.md)/[RequestsExecutor](index.md)
# RequestsExecutor
[common] interface [RequestsExecutor](index.md) :
Interface for making requests to Telegram Bot API. Currently, there is only one built-in implementation - [dev.inmo.tgbotapi.bot.Ktor.KtorRequestsExecutor](../../dev.inmo.tgbotapi.bot.Ktor/-ktor-requests-executor/index.md)
## See also
common
| | |
|---|---|
| [dev.inmo.tgbotapi.requests.abstracts.Request](../../dev.inmo.tgbotapi.requests.abstracts/-request/index.md)| |
| [dev.inmo.tgbotapi.bot.Ktor.KtorRequestsExecutor](../../dev.inmo.tgbotapi.bot.Ktor/-ktor-requests-executor/index.md)| |
## Functions
| Name | Summary |
|---|---|
| [close](../../dev.inmo.tgbotapi.extensions.behaviour_builder/-behaviour-context/index.md#%5Bio.ktor.utils.io.core%2FCloseable%2Fclose%2F%23%2FPointingToDeclaration%2F%5D%2FFunctions%2F625018081)| [common]
Content
abstract fun [close](../../dev.inmo.tgbotapi.extensions.behaviour_builder/-behaviour-context/index.md#%5Bio.ktor.utils.io.core%2FCloseable%2Fclose%2F%23%2FPointingToDeclaration%2F%5D%2FFunctions%2F625018081)()
|
| [execute](execute.md)| [common]
Content
abstract suspend fun <[T](execute.md) : [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)> [execute](execute.md)(request: [Request](../../dev.inmo.tgbotapi.requests.abstracts/-request/index.md)<[T](execute.md)>): [T](execute.md)
More info
Unsafe execution of incoming [request](execute.md).
|
## Inheritors
| Name |
|---|
| [BaseRequestsExecutor](../-base-requests-executor/index.md)|
| [BehaviourContext](../../dev.inmo.tgbotapi.extensions.behaviour_builder/-behaviour-context/index.md)|
## Extensions
| Name | Summary |
|---|---|
| [executeAsync](../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-async.md)| [common]
Content
fun <[T](../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-async.md) : [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)> [RequestsExecutor](index.md).[executeAsync](../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-async.md)(request: [Request](../../dev.inmo.tgbotapi.requests.abstracts/-request/index.md)<[T](../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-async.md)>, scope: ): <[T](../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-async.md)>
suspend fun <[T](../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-async.md) : [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)> [RequestsExecutor](index.md).[executeAsync](../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-async.md)(request: [Request](../../dev.inmo.tgbotapi.requests.abstracts/-request/index.md)<[T](../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-async.md)>): <[T](../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-async.md)>
|
| [executeUnsafe](../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-unsafe.md)| [common]
Content
suspend fun <[T](../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-unsafe.md) : [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)> [RequestsExecutor](index.md).[executeUnsafe](../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-unsafe.md)(request: [Request](../../dev.inmo.tgbotapi.requests.abstracts/-request/index.md)<[T](../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-unsafe.md)>, retries: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 0, retriesDelay: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) = 1000L, onAllFailed: suspend (exceptions: [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)>) -> [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)? = null): [T](../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-unsafe.md)?
|
| [setWebhookInfoAndStartListenWebhooks](../../dev.inmo.tgbotapi.extensions.utils.updates.retrieving/set-webhook-info-and-start-listen-webhooks.md)| [jvm]
Content
suspend fun [RequestsExecutor](index.md#%5Bdev.inmo.tgbotapi.bot%2FRequestsExecutor%2F%2F%2FPointingToDeclaration%2F%5D%2FExtensions%2F745855401).[setWebhookInfoAndStartListenWebhooks](../../dev.inmo.tgbotapi.extensions.utils.updates.retrieving/set-webhook-info-and-start-listen-webhooks.md)(listenPort: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html), engineFactory: <*, *>, setWebhookRequest: [SetWebhookRequest](../../dev.inmo.tgbotapi.requests.webhook/-set-webhook-request/index.md), exceptionsHandler: <[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)> = {}, listenHost: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) = "0.0.0.0", listenRoute: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) = "/", privateKeyConfig: [WebhookPrivateKeyConfig](../../dev.inmo.tgbotapi.updateshandlers.webhook/-webhook-private-key-config/index.md)? = null, scope: = CoroutineScope(Executors.newFixedThreadPool(4).asCoroutineDispatcher()), mediaGroupsDebounceTimeMillis: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) = 1000L, block: <[Update](../../dev.inmo.tgbotapi.types.update.abstracts/-update/index.md)>):
More info
Setting up ktor server, set webhook info via [SetWebhookRequest](../../dev.inmo.tgbotapi.requests.webhook/-set-webhook-request/index.md) request.
|
| [startGettingOfUpdatesByLongPolling](../../dev.inmo.tgbotapi.extensions.utils.updates.retrieving/start-getting-of-updates-by-long-polling.md)| [common]
Content
fun [RequestsExecutor](index.md).[startGettingOfUpdatesByLongPolling](../../dev.inmo.tgbotapi.extensions.utils.updates.retrieving/start-getting-of-updates-by-long-polling.md)(updatesFilter: [UpdatesFilter](../../dev.inmo.tgbotapi.updateshandlers/-updates-filter/index.md), timeoutSeconds: [Seconds](../../dev.inmo.tgbotapi.types/index.md#%5Bdev.inmo.tgbotapi.types%2FSeconds%2F%2F%2FPointingToDeclaration%2F%5D%2FClasslikes%2F625018081) = 30, exceptionsHandler: <[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)>? = null, scope: = CoroutineScope(Dispatchers.Default)):
|