From 7bf565229a6988880dedab7e0f15dbd65ebe806c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malte=20B=C3=BCnz?= Date: Wed, 7 Jun 2023 09:52:01 +0200 Subject: [PATCH] add additional header field (#484) --- CriticalMapsKit/Sources/ApiClient/Requests/Request.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CriticalMapsKit/Sources/ApiClient/Requests/Request.swift b/CriticalMapsKit/Sources/ApiClient/Requests/Request.swift index 5ee99739..2c79249a 100644 --- a/CriticalMapsKit/Sources/ApiClient/Requests/Request.swift +++ b/CriticalMapsKit/Sources/ApiClient/Requests/Request.swift @@ -1,4 +1,5 @@ import Foundation +import Helpers public struct Request { let endpoint: Endpoint @@ -61,7 +62,10 @@ public extension Request { // MARK: Helper -public let defaultHeaders = ["Content-Type": "application/json"] +public let defaultHeaders = [ + "Content-Type": "application/json", + "Client-Version": "iOS-\(Bundle.main.versionNumber).\(Bundle.main.buildNumber)" +] enum APIRequestBuildError: Error { case invalidURL