Scoop API

scoop:scoop.http.client:0.1.0

Companion

object Companion

source · line 108
public
public companion

Factories for buffered, streaming, and replayable body plans.

function fromProducerWithTrailers

source · line 253
public
public fun fromProducerWithTrailers(trailerNames: List<String>, contentLength: Long? = None, contentType: HttpMediaType? = None, producer: suspend (AsyncByteSink) -> List<HttpField>): RequestBody

Creates a one-shot producer returning trailers from the declared name set.

function fromProducerFactory

source · line 230
public
public fun fromProducerFactory(contentLength: Long? = None, contentType: HttpMediaType? = None, factory: suspend () -> suspend (AsyncByteSink) -> Unit): RequestBody

Creates a fresh producer for each attempt, enabling replay.

function fromProducerWithTrailersFactory

source · line 269
public
public fun fromProducerWithTrailersFactory(trailerNames: List<String>, contentLength: Long? = None, contentType: HttpMediaType? = None, factory: suspend () -> suspend (AsyncByteSink) -> List<HttpField>): RequestBody

Creates a fresh trailer-producing callback for each attempt, enabling replay.

function fromSourceFactory

source · line 170
public
public fun <T> fromSourceFactory(contentLength: Long? = None, contentType: HttpMediaType? = None, factory: suspend () -> T): RequestBody where T: AsyncByteSource, T: AsyncCloseable

Creates and closes a fresh owned source for each body attempt, enabling replay.

function fromProducer

source · line 210
public
public fun fromProducer(contentLength: Long? = None, contentType: HttpMediaType? = None, producer: suspend (AsyncByteSink) -> Unit): RequestBody

Creates a one-shot producer that writes to a borrowed sink.