Skip to content

Commit

Permalink
Add bool support
Browse files Browse the repository at this point in the history
  • Loading branch information
kean committed Jan 1, 2022
1 parent 75866fb commit edfbb55
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Sources/HTTPHeaders/HTTPHeader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,9 @@ extension HTTPHeader where T == URL {
self.init(field: field) { URL(string: $0) }
}
}

extension HTTPHeader where T == Bool {
public init(field: String) {
self.init(field: field) { Bool($0) }
}
}

0 comments on commit edfbb55

Please sign in to comment.