Update EndPointType.swift

This commit is contained in:
Jungpyo Hong 2021-05-03 01:43:00 -05:00 committed by GitHub
parent c5bc07e567
commit d63997c015
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,3 +14,24 @@ protocol EndPointType{
var task: HTTPTask { get }
var headers: HTTPHeaders? { get }
}
extension EndPointType {
var baseURL: URL {
guard let url = URL(string: "ADD your baseURL") else {
fatalError("baseURL Error")
}
return url
}
var httpMethod: HTTPMethod {
.get
}
var task: HTTPTask {
.request
}
var headers: HTTPHeaders? {
nil
}
}