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

25 lines
342 B
Swift

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] {
[]
}
}