@@ -70,7 +70,6 @@ public struct URLSessionTransport: ClientTransport {
70
70
/// - Parameter session: The URLSession used for performing HTTP operations.
71
71
/// If none is provided, the system uses the shared URLSession.
72
72
public init ( session: URLSession = . shared) { self . init ( session: session, implementation: . platformDefault) }
73
-
74
73
/// Specifies the mode in which HTTP request and response bodies are processed.
75
74
public enum HTTPBodyProcessingMode {
76
75
/// Processes the HTTP body incrementally as bytes become available.
@@ -85,15 +84,15 @@ public struct URLSessionTransport: ClientTransport {
85
84
/// Use this mode when it's necessary or simpler to handle complete data payloads at once.
86
85
case buffered
87
86
}
88
-
87
+ /// Creates a new configuration with the provided session.
88
+ /// - Parameters:
89
+ /// - session: The URLSession used for performing HTTP operations.
90
+ /// - httpBodyProcessingMode: The mode used to process HTTP request and response bodies.
89
91
public init ( session: URLSession = . shared, httpBodyProcessingMode: HTTPBodyProcessingMode ) {
90
92
self . session = session
91
93
switch httpBodyProcessingMode {
92
-
93
- case . streamed:
94
- self . implementation = . defaultStreaming
95
- case . buffered:
96
- self . implementation = . buffering
94
+ case . streamed: self . implementation = . defaultStreaming
95
+ case . buffered: self . implementation = . buffering
97
96
}
98
97
}
99
98
@@ -382,7 +381,6 @@ extension URLSessionTransport.Configuration.Implementation {
382
381
guard platformSupportsStreaming else { return . buffering }
383
382
return . defaultStreaming
384
383
}
385
-
386
384
static var defaultStreaming : Self {
387
385
. streaming(
388
386
requestBodyStreamBufferSize: 16 * 1024 ,
0 commit comments