From 19c7bc3856d21fd9d22380b4d76b5d9279babe1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Junnos=20=EF=A3=BF?= Date: Fri, 1 Dec 2023 00:53:51 +0900 Subject: [PATCH] =?UTF-8?q?:truck:=20=EC=82=AC=EC=9A=A9=EB=90=98=EC=A7=80?= =?UTF-8?q?=20=EC=95=8A=EB=8A=94=20=ED=8C=8C=EC=9D=BC=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/MSNetworking/MSRouter.swift | 42 ------------------- 1 file changed, 42 deletions(-) delete mode 100644 iOS/MSCoreKit/Sources/MSNetworking/MSRouter.swift diff --git a/iOS/MSCoreKit/Sources/MSNetworking/MSRouter.swift b/iOS/MSCoreKit/Sources/MSNetworking/MSRouter.swift deleted file mode 100644 index 787d47b..0000000 --- a/iOS/MSCoreKit/Sources/MSNetworking/MSRouter.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// MSRouter.swift -// MSCoreKit -// -// Created by 전민건 on 11/16/23. -// - -import Foundation - -public struct RouterType { - - private var encodable: Encodable? - - // 기능별 MSRouter - public var getJourney: MSRouter { - MSRouter(baseURL: .none, pathURL: .none, method: .get, body: HTTPBody(content: encodable)) - } - public var getPerson: MSRouter { - MSRouter(baseURL: .none, pathURL: .none, method: .get, body: HTTPBody(content: encodable)) - } - -} - -public struct MSRouter: Router { - - let baseURL: APIbaseURL - let pathURL: APIpathURL - let method: HTTPMethod - var body: HTTPBody - - func asURLRequest() -> URLRequest? { - guard let url = URL(string: baseURL.rawValue + pathURL.rawValue) else { - return nil - } - var request = URLRequest(url: url) - request.httpMethod = method.rawValue - request.httpBody = body.contentToData() - - return request - } - -}