Skip to content

okhttp / okhttp3 / Cookie / Builder

Builder

class Builder

Builds a cookie. The name, value, and domain values must all be set before calling build.

Constructors

Name Summary
<init> Builder()
Builds a cookie. The name, value, and domain values must all be set before calling build.

Functions

Name Summary
build fun build():Cookie
domain fun domain(domain:String):Cookie.Builder
Set the domain pattern for this cookie. The cookie will match domain and all of its subdomains.
expiresAt fun expiresAt(expiresAt:Long):Cookie.Builder
hostOnlyDomain fun hostOnlyDomain(domain:String):Cookie.Builder
Set the host-only domain for this cookie. The cookie will match domain but none of its subdomains.
httpOnly fun httpOnly():Cookie.Builder
name fun name(name:String):Cookie.Builder
path fun path(path:String):Cookie.Builder
secure fun secure():Cookie.Builder
value fun value(value:String):Cookie.Builder