- 
                Notifications
    
You must be signed in to change notification settings  - Fork 8
 
Open
Labels
Description
Postable and Postable are basically the same thing.
public protocol Getable {
    @discardableResult
    func get<T: Decodable>(url: String,
                           onComplete: @escaping OnComplete<T>) -> Cancellable
    @discardableResult
    func get<T: Decodable>(url: URL,
                           onComplete: @escaping OnComplete<T>) -> Cancellable
    @discardableResult
    func get<T: Decodable, U: Encodable>(url: String, query: U,
                                         onComplete: @escaping OnComplete<T>) -> Cancellable
    @discardableResult
    func get<T: Decodable, U: Encodable>(url: URL, query: U,
                                         onComplete: @escaping OnComplete<T>) -> Cancellable
}protocol Postable {
    @discardableResult
    func post<T: Decodable>(url: String,
                            onComplete: @escaping OnComplete<T>) -> Cancellable
    @discardableResult
    func post<T: Decodable>(url: URL,
                            onComplete: @escaping OnComplete<T>) -> Cancellable
    @discardableResult
    func post<T: Decodable, U: Encodable>(url: String, body: U,
                                          onComplete: @escaping OnComplete<T>) -> Cancellable
    @discardableResult
    func post<T: Decodable, U: Encodable>(url: URL, body: U,
                                          onComplete: @escaping OnComplete<T>) -> Cancellable
}Why do not make one protocol and then extend it if necessary?