An iOS project that is practiced with RxSwift
A simple URLSession
wrapper that is implemented with RxSwift
.
The protocol of NetworkRequest
makes you define the HTTP request easily and could be converted to a URLRequest
.
The class of HTTPClient
helps to create the connection from a request which conforms the NetworkRequest
. It would decode the response automatically as the NetworkRequest.Response
after received the network callback.
Usage:
let observable = HTTPClient().fetchDataModel(request: SomeRequest())
A simple image loader that contains the functions of download and cache images. You could easily pass a URL
to retrieve the image. The caching would store the data to the memory and disk. The image loader is implemented with RxSwift
.
Usage:
ImageLoader().retrieveImage(with: url).bind(to: imageView.rx.image)
- Xcode 12.2
- Swift 5.3
Nixon Shih, [email protected]
RxSwiftPlayground is available under the MIT license. See the LICENSE file for more info.