From f734a0ad900a90f17965d5dfb4228d5aa92b1aa4 Mon Sep 17 00:00:00 2001 From: Jack Newcombe Date: Fri, 16 Feb 2024 13:07:10 +0000 Subject: [PATCH] Remove body for client token --- .../Services/PrimerDataService.swift | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Co-Badged Cards/SwiftUI/Co-Badged Cards Example/Services/PrimerDataService.swift b/Co-Badged Cards/SwiftUI/Co-Badged Cards Example/Services/PrimerDataService.swift index 007001d..10e80ca 100644 --- a/Co-Badged Cards/SwiftUI/Co-Badged Cards Example/Services/PrimerDataService.swift +++ b/Co-Badged Cards/SwiftUI/Co-Badged Cards Example/Services/PrimerDataService.swift @@ -29,11 +29,6 @@ class PrimerDataService: NSObject { typealias ErrorsDelegate = PrimerDataServiceErrorsDelegate typealias ModelsDelegate = PrimerDataServiceModelsDelegate - struct ClientTokenRequestModel: Encodable { - let currencyCode: String - let amount: Int - } - struct ClientTokenModel: Decodable { let clientToken: String } @@ -64,8 +59,6 @@ class PrimerDataService: NSObject { func fetchClientToken(from url: String) async throws -> String { do { var request = URLRequest(url: URL(string: "\(url)/client-session")!) - request.httpBody = try JSONEncoder().encode(ClientTokenRequestModel(currencyCode: "GBP", amount: 4999)) - request.addValue("application/json", forHTTPHeaderField: "Content-Type") request.httpMethod = "POST" let (data, _) = try await URLSession.shared.data(for: request)