mirror of https://github.com/oxen-io/session-ios
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
601 B
Swift
22 lines
601 B
Swift
2 years ago
|
// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
|
||
2 years ago
|
//
|
||
|
// stringlint:disable
|
||
2 years ago
|
|
||
|
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 }
|
||
|
}
|
||
|
}
|