Skip to content

Instantly share code, notes, and snippets.

@aaronlab
Created December 31, 2021 09:55
Show Gist options
  • Save aaronlab/be66c02564e4dea034deca3f7d453e6c to your computer and use it in GitHub Desktop.
Save aaronlab/be66c02564e4dea034deca3f7d453e6c to your computer and use it in GitHub Desktop.
Api Service
import Alamofire
import Foundation
import RxSwift
/// APIService
protocol APIService {
func request<T: BaseAPIResponse>(with request: URLRequest) -> Observable<APIResult<T>>
func upload<T: BaseAPIResponse>(with url: URL,
method: Alamofire.HTTPMethod,
headers: HTTPHeaders?,
parameters: [MultipartData]) -> Observable<APIResult<T>>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment