mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-23 02:28:45 +00:00
RequestsExecutor now is Closeable
This commit is contained in:
parent
4dba67979d
commit
d8887bb7ff
@ -8,6 +8,8 @@
|
|||||||
* Joda Time version `2.10.1` -> `2.10.3`
|
* Joda Time version `2.10.1` -> `2.10.3`
|
||||||
* Ktor version `1.1.4` -> `1.2.2`
|
* Ktor version `1.1.4` -> `1.2.2`
|
||||||
|
|
||||||
|
* `RequestsExecutor` now is `Closeable`
|
||||||
|
|
||||||
## 0.16.0 Bot API 4.3
|
## 0.16.0 Bot API 4.3
|
||||||
|
|
||||||
* `LoginURL` and `LoginURLInlineKeyboardButton` has been added
|
* `LoginURL` and `LoginURLInlineKeyboardButton` has been added
|
||||||
|
@ -83,4 +83,8 @@ class KtorRequestsExecutor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun close() {
|
||||||
|
client.close()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,9 @@ package com.github.insanusmokrassar.TelegramBotAPI.bot
|
|||||||
|
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.exceptions.RequestException
|
import com.github.insanusmokrassar.TelegramBotAPI.bot.exceptions.RequestException
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.Request
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.Request
|
||||||
|
import kotlinx.io.core.Closeable
|
||||||
|
|
||||||
interface RequestsExecutor {
|
interface RequestsExecutor : Closeable {
|
||||||
@Throws(RequestException::class)
|
@Throws(RequestException::class)
|
||||||
suspend fun <T : Any> execute(request: Request<T>): T
|
suspend fun <T : Any> execute(request: Request<T>): T
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user