Skip to content

iOS PromiseKit + Alamofire을 이용한 Network 설계

Notifications You must be signed in to change notification settings

wooky83/NetworkModule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build

NetworkModule 😎

iOS HTTP Server 통신 구조 설계

  1. PromiseKit + Alamofire
  • PromiseKit + Alamofire + Codable
  • Promise pipe를 이용한 Exception 자동 재요청
  • Server 예외에 대한 일괄처리
  • 확장성, 캡슐화 용이
  • simple
firstly {
    NetRequest.testJson<PersonBean>(["name": "wooky"])
}
.done {
    print("result is \($0)")
}
.catch {
    print("error is : \($0)")
}
  1. Combine + URLSession
  • 확장성, 캡슐화 용이
  • simple
Service
    .jsonplaceholderUser()
    .sink(receiveCompletion: { completion in                
    }, receiveValue: { model in
    })
    .store(in: &self.cancellables)
  1. Rxswift + RxAlamofire
  • 확장성, 캡슐화 용이
  • simple
Service
    .rxAlamofireSuccess()
    .subscribe(onNext: { model in
    })
    .disposed(by: self.disposeBag)

About

iOS PromiseKit + Alamofire을 이용한 Network 설계

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages