2022-12-08 04:21:38 +01:00
|
|
|
// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
|
2023-09-25 10:32:56 +02:00
|
|
|
//
|
|
|
|
// stringlint:disable
|
2022-12-08 04:21:38 +01:00
|
|
|
|
|
|
|
import Foundation
|
|
|
|
|
|
|
|
public typealias HTTPHeader = String
|
|
|
|
|
|
|
|
public extension HTTPHeader {
|
|
|
|
static let authorization: HTTPHeader = "Authorization"
|
|
|
|
static let contentType: HTTPHeader = "Content-Type"
|
|
|
|
static let contentDisposition: HTTPHeader = "Content-Disposition"
|
|
|
|
}
|
|
|
|
|
|
|
|
// MARK: - Convenience
|
|
|
|
|
|
|
|
public extension Dictionary where Key == HTTPHeader, Value == String {
|
|
|
|
func toHTTPHeaders() -> [String: String] {
|
|
|
|
return self.reduce(into: [:]) { result, next in result[next.key] = next.value }
|
|
|
|
}
|
|
|
|
}
|