Scoop API

scoop:scoop.http.client:0.1.0

HttpCallChain

class HttpCallChain

source · line 17
public
public class HttpCallChain internal constructor(
    internal val invocation: ClientInvocation,
    internal val next: Long,
    /**
         * The current request passed to this interceptor.
         */
    public val request: HttpRequest
)

The current logical request and one-shot continuation into later interceptors or transport.

property request

source · line 23
public
public val request: HttpRequest

get: public read-only

The current request passed to this interceptor.

function proceed

source · line 40
public
public suspend fun proceed(url: Url = request.url, method: String = request.method, fields: List<HttpField> = suppliedFields, body: RequestBody = request.body): HttpCallResult

Invokes the remainder of the chain once while active, optionally replacing URL, method, fields, and body. WebSocket chains require a replayable empty GET.

property suppliedFields

source · line 28
public
public val suppliedFields: Array<HttpField>

get: public read-only

The caller-supplied fields, before client-managed framing and authority.

property webSocketOptions

source · line 32
public
public val webSocketOptions: HttpWebSocketOptions?

get: public read-only

Upgrade options when this chain belongs to a WebSocket handshake.