mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
19 lines
576 B
Swift
19 lines
576 B
Swift
// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
|
|
|
|
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 }
|
|
}
|
|
}
|