![JAR search and dependency download from the Maven repository](/logo.png)
commonMain.com.lt.lazy_people_http.call.adapter.SuspendHook.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of LazyPeopleHttp-lib-jvm Show documentation
Show all versions of LazyPeopleHttp-lib-jvm Show documentation
Lazy people http, Retrofit of kmp all targets
package com.lt.lazy_people_http.call.adapter
import com.lt.lazy_people_http.call.Call
import com.lt.lazy_people_http.config.LazyPeopleHttpConfig
import com.lt.lazy_people_http.request.RequestInfo
/**
* creator: lt 2023/6/28 [email protected]
* effect : 用于hook suspend过程
* warning:
* [T]接口声明的返回值类型
*/
interface SuspendHook {
/**
* 是否hook
*/
fun whetherToHook(
config: LazyPeopleHttpConfig,
info: RequestInfo
): Boolean
/**
* hook suspend过程
*/
suspend fun hook(
config: LazyPeopleHttpConfig,
info: RequestInfo,
call: Call,
callFunction: suspend (LazyPeopleHttpConfig, RequestInfo) -> T,
): T
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy