Skip to content

Instantly share code, notes, and snippets.

@IsaAliev
Created February 23, 2018 19:06
Show Gist options
  • Save IsaAliev/99087b93f3d772d838c598a96259b41c to your computer and use it in GitHub Desktop.
Save IsaAliev/99087b93f3d772d838c598a96259b41c to your computer and use it in GitHub Desktop.
import Foundation
protocol Service {
associatedtype ResultTypeValue: Decodable
typealias SuccessHandlerBlock = (ResultTypeValue) -> ()
typealias FailureHandlerBlock = (ErrorRepresentable) -> ()
var request: HTTPRequestRepresentable? { get set }
var responseHandler: HTTPResponseHandler<ResultTypeValue>? { get set }
func sendRequest() -> Self?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment