scoop:scoop.http.client:0.1.0
src/response/http_decoding_options_builder.scoop
Selected production source · src/response/http_decoding_options_builder.scoop
1
package scoop.http.client3
import scoop.compression.CompressionFormat4
import scoop.http.*5
import scoop.http.asyncio.*6
import scoop.asyncio.*8
/** Configures one complete value; execution remains explicit. */9
public fun httpDecodingOptions(10
configure: HttpDecodingOptionsBuilder.() -> Unit = {}11
): HttpDecodingOptions {12
val builder = HttpDecodingOptionsBuilder()13
builder.configure()14
return builder.snapshot()15
}17
public fun HttpDecodingOptions.copy(18
configure: HttpDecodingOptionsBuilder.() -> Unit = {}19
): HttpDecodingOptions {20
val builder = HttpDecodingOptionsBuilder()21
builder.mode = this.mode22
builder.bufferSize = this.bufferSize23
builder.maxWindowBytes = this.maxWindowBytes24
builder.configure()25
return builder.snapshot()26
}28
public class HttpDecodingOptionsBuilder internal constructor() {29
public var mode: HttpContentDecoding = HttpContentDecoding.Automatic30
public var bufferSize: Long = 8192L31
public var maxWindowBytes: Long? = None32
internal fun snapshot(): HttpDecodingOptions =33
HttpDecodingOptions(mode, bufferSize, maxWindowBytes)34
}