@@ -85,17 +85,10 @@ public struct URLSessionTransport: ClientTransport {
85
85
86
86
private init ( _ implementation: Configuration . Implementation ) { self . implementation = implementation }
87
87
88
- /// Processes the HTTP body incrementally as bytes become available.
89
- ///
90
- /// Use this mode to handle large payloads efficiently or to begin processing
91
- /// before the entire body has been received. Will throw a `URLSessionTransportError.streamingNotSupported`
92
- /// error if not available on the platform.
93
- public static let streamed = HTTPBodyProcessingMode ( . defaultStreaming)
94
- /// Waits until the entire HTTP body has been received before processing begins.
95
- ///
96
- /// Use this mode when it's necessary or simpler to handle complete data payloads at once.
88
+ /// Use this mode to force URLSessionTransport to transfer data in a buffered mode, even if
89
+ /// streaming would be available on the platform.
97
90
public static let buffered = HTTPBodyProcessingMode ( . buffering)
98
- /// Automatically chooses the optimal transport mode, based on the platform being used .
91
+ /// Data is transfered via streaming if available on the platform, else it falls back to buffering .
99
92
public static let platformDefault = HTTPBodyProcessingMode ( . platformDefault)
100
93
}
101
94
@@ -375,10 +368,7 @@ extension URLSessionTransport.Configuration.Implementation {
375
368
376
369
static var platformDefault : Self {
377
370
guard platformSupportsStreaming else { return . buffering }
378
- return . defaultStreaming
379
- }
380
- static var defaultStreaming : Self {
381
- . streaming(
371
+ return . streaming(
382
372
requestBodyStreamBufferSize: 16 * 1024 ,
383
373
responseBodyStreamWatermarks: ( low: 16 * 1024 , high: 32 * 1024 )
384
374
)
0 commit comments