mirror of
https://github.com/jphong1111/awesome-ios-developer.git
synced 2025-01-03 13:31:09 +07:00
Update EndPointType.swift
This commit is contained in:
parent
c5bc07e567
commit
d63997c015
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user