Skip to content

Commit 2f280f0

Browse files
committed
explicitly keeping init(session:)
1 parent beb7d45 commit 2f280f0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Sources/OpenAPIURLSession/URLSessionTransport.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,10 @@ public struct URLSessionTransport: ClientTransport {
7474
let implementation = httpBodyProcessingMode.implementation
7575
self.init(session: session, implementation: implementation)
7676
}
77+
/// Creates a new configuration with the provided session.
78+
/// - Parameter session: The URLSession used for performing HTTP operations.
79+
public init(session: URLSession) { self.init(session: session, implementation: .platformDefault) }
7780
/// Specifies the mode in which HTTP request and response bodies are processed.
78-
7981
public struct HTTPBodyProcessingMode: Sendable {
8082
/// Exposing the internal implementation directly.
8183
fileprivate let implementation: Configuration.Implementation

Tests/OpenAPIURLSessionTests/TaskCancellationTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import HTTPTypes
1818
import NIO
1919
import OpenAPIRuntime
2020
import XCTest
21+
import NIOHTTP1
2122
@testable import OpenAPIURLSession
2223

2324
enum CancellationPoint: CaseIterable {

0 commit comments

Comments
 (0)