okhttp / okhttp3 / Request / tag

tag

fun tag(): Any?

Returns the tag attached with Object.class as a key, or null if no tag is attached with that key.

Prior to OkHttp 3.11, this method never returned null if no tag was attached. Instead it returned either this request, or the request upon which this request was derived with newBuilder.

fun <T> tag(type: Class<out T>): T?

Returns the tag attached with type as a key, or null if no tag is attached with that key.