Skip to content

Commit

Permalink
Refine HTTPRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
Alkenso committed Aug 29, 2024
1 parent 6350f64 commit a0e78ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/SpellbookHTTP/HTTPRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -176,7 +176,7 @@ extension HTTPRequest {
urlRequest.setValue($0.value, forHTTPHeaderField: $0.key.rawValue)
}

try extended?(&urlRequest)
try additional?(&urlRequest)

return urlRequest
}
Expand Down

0 comments on commit a0e78ca

Please sign in to comment.