Skip to content

Instantly share code, notes, and snippets.

@MickhailP
Created January 14, 2023 11:47
Show Gist options
  • Save MickhailP/0994103409c20ff4d2909bf146dee2e1 to your computer and use it in GitHub Desktop.
Save MickhailP/0994103409c20ff4d2909bf146dee2e1 to your computer and use it in GitHub Desktop.
NetworkEndpoint
protocol Endpoint {
var scheme: String { get }
var host: String { get }
var path: String { get }
var method: RequestMethod { get }
var header: [String: String]? { get }
var body: [String: String]? { get }
}
extension Endpoint {
var scheme: String {
return "https"
}
var host: String {
return "YOUR HOST HERE"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment