Skip to content

Commit a1b1562

Browse files
committed
removing .streamed HTTPBodyProcessingMode
1 parent adb6c07 commit a1b1562

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

Sources/OpenAPIURLSession/URLSessionTransport.swift

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,10 @@ public struct URLSessionTransport: ClientTransport {
8585

8686
private init(_ implementation: Configuration.Implementation) { self.implementation = implementation }
8787

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.
9790
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.
9992
public static let platformDefault = HTTPBodyProcessingMode(.platformDefault)
10093
}
10194

@@ -375,10 +368,7 @@ extension URLSessionTransport.Configuration.Implementation {
375368

376369
static var platformDefault: Self {
377370
guard platformSupportsStreaming else { return .buffering }
378-
return .defaultStreaming
379-
}
380-
static var defaultStreaming: Self {
381-
.streaming(
371+
return .streaming(
382372
requestBodyStreamBufferSize: 16 * 1024,
383373
responseBodyStreamWatermarks: (low: 16 * 1024, high: 32 * 1024)
384374
)

0 commit comments

Comments
 (0)