Rocket.Chat.ReactNative/ios/RocketChat Watch App/Client/HTTP/Request.swift

25 lines
342 B
Swift
Raw Normal View History

2024-04-26 20:33:11 +00:00
import Foundation
protocol Request<Response> {
associatedtype Response: Codable
var path: String { get }
var method: HTTPMethod { get }
var body: Data? { get }
var queryItems: [URLQueryItem] { get }
}
extension Request {
var method: HTTPMethod {
.get
}
var body: Data? {
nil
}
var queryItems: [URLQueryItem] {
[]
}
}