Scoop API

scoop:scoop.http:0.1.0

HttpLocation

class HttpLocation

source · line 10
public
public class HttpLocation private constructor(
    /**
     * The parsed absolute or relative URL reference.
     */
    public val reference: Url,
    /**
     * The original parsed field-value bytes, or None for a programmatically constructed value.
     */
    public val originalValue: Array<Byte>?
)

A parsed Location URL reference, preserving original bytes and requiring a base URL for relative resolution.

function toByteArray

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

Serializes the structured value into HTTP field-value bytes.

function toHttpField

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

Builds the corresponding named HTTP field from the structured value.

function resolve

source · line 26
public
public fun resolve(base: Url): Url

Resolves against the base URL, inheriting its fragment when the Location reference omits one.

property originalValue

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

get: public read-only

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

property reference

source · line 14
public
public val reference: Url

get: public read-only

The parsed absolute or relative URL reference.