Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/grgbishow/network-manager
- Owner: GRGBISHOW
- Created: 2018-09-30T18:17:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-23T07:15:05.000Z (almost 6 years ago)
- Last Synced: 2024-11-13T22:06:09.593Z (2 months ago)
- Topics: alamofire, codable, ios, iosdevelopment, network, rxcocoa, rxswift, swift, unittest
- Language: Swift
- Homepage:
- Size: 392 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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)
}
}
```