HttpStatement

interface HttpStatement : ObjectWrapper<ERROR CLASS: Symbol not found for io.ktor.client.statement.HttpStatement>

脚本层包装HttpStatement,提供带作用域的异步执行能力。

与原生 io.ktor.client.statement.HttpStatement 相比, 本接口通过 CoroutineScopeDeferred 实现脚本友好的异步调用。

Author

M8Test, [email protected], https://m8test.com

Functions

Link copied to clipboard
abstract fun also(block: (ERROR CLASS: Symbol not found for io.ktor.client.statement.HttpStatement) -> Unit): ObjectWrapper<ERROR CLASS: Symbol not found for io.ktor.client.statement.HttpStatement>

对 ObjectWrapper 调用给定的 block 函数,并返回 ObjectWrapper 本身。

Link copied to clipboard
abstract fun apply(block: ERROR CLASS: Symbol not found for io.ktor.client.statement.HttpStatement.() -> Unit): ObjectWrapper<ERROR CLASS: Symbol not found for io.ktor.client.statement.HttpStatement>

对 ObjectWrapper 调用给定的 block 函数,并返回 ObjectWrapper 本身。

Link copied to clipboard
abstract fun <T> execute(scope: CoroutineScope, block: (scope: CoroutineScope, response: HttpClientResponse) -> Deferred<T>): Deferred<T>

在指定协程作用域内流式执行请求,并把响应交给 block 处理。

Link copied to clipboard
abstract fun getOrigin(): ERROR CLASS: Symbol not found for io.ktor.client.statement.HttpStatement

获取原始的对象.

Link copied to clipboard
abstract fun <R> let(block: (ERROR CLASS: Symbol not found for io.ktor.client.statement.HttpStatement) -> R): ObjectWrapper<R>?

对 ObjectWrapper 调用给定的 block 函数,并返回 block 函数的结果包装在 ObjectWrapper 中。

Link copied to clipboard
abstract fun <R> run(block: ERROR CLASS: Symbol not found for io.ktor.client.statement.HttpStatement.() -> R): ObjectWrapper<R>?

对 ObjectWrapper 调用给定的 block 函数,并返回 block 函数的结果包装在 ObjectWrapper 中。

Link copied to clipboard
abstract fun setOrigin(origin: ERROR CLASS: Symbol not found for io.ktor.client.statement.HttpStatement)

设置原始对象

Link copied to clipboard
abstract fun takeIf(predicate: (ERROR CLASS: Symbol not found for io.ktor.client.statement.HttpStatement) -> Boolean): ObjectWrapper<ERROR CLASS: Symbol not found for io.ktor.client.statement.HttpStatement>?

如果 ObjectWrapper 满足给定的 predicate,则返回 ObjectWrapper 本身,否则返回 null 包装在 ObjectWrapper? 中。

Link copied to clipboard
abstract fun takeUnless(predicate: (ERROR CLASS: Symbol not found for io.ktor.client.statement.HttpStatement) -> Boolean): ObjectWrapper<ERROR CLASS: Symbol not found for io.ktor.client.statement.HttpStatement>?

如果 ObjectWrapper 不满足给定的 predicate,则返回 ObjectWrapper 本身,否则返回 null 包装在 ObjectWrapper? 中。