Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/grgbishow/network-manager

Network Layer based on Alamofire.
https://github.com/grgbishow/network-manager

alamofire codable ios iosdevelopment network rxcocoa rxswift swift unittest

Last synced: 3 days ago
JSON representation

Network Layer based on Alamofire.

Awesome Lists containing this project

README

        

# Network Manager

Network Manager is a network layer based on RxAlamofire and Alamofire. Network Manager is centralized class to do all the requests and manage errors in reactive way.

# Usage

``` Swift
enum NetworkClients {
static let userDataService = NetWorkManager().createClient(withPath: "user/2", method: .get)
}
```

``` Swift
func getUserData() {
_ = userDataService.request().parse(toType: DataModel.self).subscribe(onSuccess: { (model) in
print(model.data)
}) { (error) in
print(error.localizedDescription)
}
}
```