From a0e78cafaed2063178461ba3ed8cf2716baf7c22 Mon Sep 17 00:00:00 2001 From: "Alkenso (Vladimir Vashurkin)" Date: Thu, 29 Aug 2024 18:17:18 +0300 Subject: [PATCH] Refine HTTPRequest --- Sources/SpellbookHTTP/HTTPRequest.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/SpellbookHTTP/HTTPRequest.swift b/Sources/SpellbookHTTP/HTTPRequest.swift index 029d845..b56cd73 100644 --- a/Sources/SpellbookHTTP/HTTPRequest.swift +++ b/Sources/SpellbookHTTP/HTTPRequest.swift @@ -32,7 +32,7 @@ public struct HTTPRequest { public var query: [QueryItem: String] = [:] public var headers: [Header: String] = [:] public var body: Body? - public var extended: ((inout URLRequest) throws -> Void)? + public var additional: ((inout URLRequest) throws -> Void)? public init(urlString: String, method: Method) { self.url = urlString @@ -176,7 +176,7 @@ extension HTTPRequest { urlRequest.setValue($0.value, forHTTPHeaderField: $0.key.rawValue) } - try extended?(&urlRequest) + try additional?(&urlRequest) return urlRequest }