Scoop API

scoop:scoop.http.client:0.1.0

src/response/http_decoding_options_builder.scoop

Selected production source · src/response/http_decoding_options_builder.scoop

1package scoop.http.client
3import scoop.compression.CompressionFormat
4import scoop.http.*
5import scoop.http.asyncio.*
6import scoop.asyncio.*
8/** Configures one complete value; execution remains explicit. */
9public fun httpDecodingOptions(
10 configure: HttpDecodingOptionsBuilder.() -> Unit = {}
11): HttpDecodingOptions {
12 val builder = HttpDecodingOptionsBuilder()
13 builder.configure()
14 return builder.snapshot()
17public fun HttpDecodingOptions.copy(
18 configure: HttpDecodingOptionsBuilder.() -> Unit = {}
19): HttpDecodingOptions {
20 val builder = HttpDecodingOptionsBuilder()
21 builder.mode = this.mode
22 builder.bufferSize = this.bufferSize
23 builder.maxWindowBytes = this.maxWindowBytes
24 builder.configure()
25 return builder.snapshot()
28public class HttpDecodingOptionsBuilder internal constructor() {
29 public var mode: HttpContentDecoding = HttpContentDecoding.Automatic
30 public var bufferSize: Long = 8192L
31 public var maxWindowBytes: Long? = None
32 internal fun snapshot(): HttpDecodingOptions =
33 HttpDecodingOptions(mode, bufferSize, maxWindowBytes)