ktor-client-core / io.ktor.client.request / cookie

cookie

fun HttpRequestBuilder.cookie(name: String, value: String, maxAge: Int = 0, expires: GMTDate? = null, domain: String? = null, path: String? = null, secure: Boolean = false, httpOnly: Boolean = false, extensions: Map<String, String?> = emptyMap()): Unit

Sets a single header of key with a specific value if the value is not null.