Skip to content

Commit e3155a0

Browse files
committed
Fix API breaking change
1 parent 5024ee6 commit e3155a0

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

Sources/AsyncHTTPClient/HTTPClient.swift

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,19 @@ extension HTTPClient.Configuration {
935935
self.connect ?? .seconds(10)
936936
}
937937

938+
/// Create timeout.
939+
///
940+
/// - parameters:
941+
/// - connect: `connect` timeout. Will default to 10 seconds, if no value is provided.
942+
/// - read: `read` timeout.
943+
public init(
944+
connect: TimeAmount? = nil,
945+
read: TimeAmount? = nil
946+
) {
947+
self.connect = connect
948+
self.read = read
949+
}
950+
938951
/// Create timeout.
939952
///
940953
/// - parameters:
@@ -944,7 +957,7 @@ extension HTTPClient.Configuration {
944957
public init(
945958
connect: TimeAmount? = nil,
946959
read: TimeAmount? = nil,
947-
write: TimeAmount? = nil
960+
write: TimeAmount
948961
) {
949962
self.connect = connect
950963
self.read = read

0 commit comments

Comments
 (0)