Skip to content

Commit dac63f8

Browse files
reverted the [String: Any] for response headers instead of [String: String]
1 parent e3e80c1 commit dac63f8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

AdyenNetworking/APIClient/Errors.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public enum APIClientError: LocalizedError {
2121
public struct ParsingError: LocalizedError {
2222

2323
/// HTTP Headers.
24-
public let headers: [String: Any]
24+
public let headers: [String: String]
2525

2626
/// HTTP Status Code.
2727
public let statusCode: Int

AdyenNetworking/APIClient/HTTPResponse.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Foundation
99
public struct HTTPResponse<R: Response> {
1010

1111
/// HTTP Headers.
12-
public let headers: [String: Any]
12+
public let headers: [String: String]
1313

1414
/// HTTP Status Code.
1515
public let statusCode: Int

AdyenNetworking/Helpers/URLSessionHelpers.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ internal struct URLSessionSuccess {
1111

1212
internal let statusCode: Int
1313

14-
internal let headers: [String: Any]
14+
internal let headers: [String: String]
1515

1616
internal init(data: Data?, response: URLResponse?) throws {
1717
guard let data = data,
1818
let httpResponse = response as? HTTPURLResponse,
19-
let headers = httpResponse.allHeaderFields as? [String: Any] else {
19+
let headers = httpResponse.allHeaderFields as? [String: String] else {
2020
throw APIClientError.invalidResponse
2121
}
2222

0 commit comments

Comments
 (0)