From edfbb55b30e0b925d5c31c7a6da39f9585007906 Mon Sep 17 00:00:00 2001 From: kean Date: Sat, 1 Jan 2022 14:00:43 -0500 Subject: [PATCH] Add bool support --- Sources/HTTPHeaders/HTTPHeader.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/HTTPHeaders/HTTPHeader.swift b/Sources/HTTPHeaders/HTTPHeader.swift index 25ce085..3d6289d 100644 --- a/Sources/HTTPHeaders/HTTPHeader.swift +++ b/Sources/HTTPHeaders/HTTPHeader.swift @@ -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) } + } +}