Scoop API

scoop:scoop.http:0.1.0

HttpSetCookie

class HttpSetCookie

source · line 13
public
public class HttpSetCookie private constructor(
    /**
     * The cookie name/value pair.
     */
    public val pair: HttpCookiePair,
        /**
         * Ordered original cookie attributes.
         */
        public val attributes: Array<HttpCookieAttribute>,
        /**
         * The original parsed field-value bytes, or None for a programmatically constructed value.
         */
        public val originalValue: Array<Byte>?
)

One Set-Cookie field with its ordered attributes and interpreted cookie properties. Resolve against the response URL before storing it.

property originalValue

source · line 25
public
public val originalValue: Array<Byte>?

get: public read-only

The original parsed field-value bytes, or None for a programmatically constructed value.

function resolve

source · line 69
public
public fun resolve(url: Url, now: Instant, suffixes: PublicSuffixList, maxLifetimeSeconds: Long = 34560000L): Result<HttpCookie, HttpCookieRejection>

Resolves and validates domain, public suffix, path, Secure, SameSite, and name-prefix rules for the response URL.

function toByteArray

source · line 75
public
public fun toByteArray(): Array<Byte>

Serializes the structured value into HTTP field-value bytes.

function toHttpField

source · line 85
public
public fun toHttpField(): HttpField

Builds a separate Set-Cookie field with never-index enabled.