[net](../../index.md) / [com.drake.net.okhttp](../index.md) / [okhttp3.OkHttpClient](index.md) / [cancelId](./cancel-id.md) # cancelId `fun OkHttpClient.cancelId(id: `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`?): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) 取消OkHttp客户端中指定Id的请求 如果使用的是Net创建的网络请求请使用[com.drake.net.Net.cancelId](../../com.drake.net/-net/cancel-id.md)