Skip to content

Commit c656ab9

Browse files
committed
Conform HTTPClientHeaders to ExpressibleByDictionaryLiteral
1 parent 6dd81d8 commit c656ab9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sources/Basics/HTTPClient.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,12 @@ public struct HTTPClientHeaders: Sequence, Equatable {
355355
}
356356
}
357357

358+
extension HTTPClientHeaders: ExpressibleByDictionaryLiteral {
359+
public init(dictionaryLiteral elements: (String, String)...) {
360+
self.init(elements.map(Item.init))
361+
}
362+
}
363+
358364
public enum HTTPClientError: Error, Equatable {
359365
case invalidResponse
360366
case badResponseStatusCode(Int)

0 commit comments

Comments
 (0)