Skip to content

CheATSlark/JRACRequest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JRACRequest

CI Status Version License Platform

介绍

通过 ReactiveObjc 和 YTKNetwork 结合的方式,实现了 OC 版本的网络响应框架

例子

JRBaseRequest 默认实现 post 方式的网络请求。 request 和 response 的序列化都是采用JSON的方式。

数据格式: { code = 200; data = ""; msg = OK; timestamp = 20211209124400; }

如果需要调整,请求方式,序列化格式等,可以通过继承重新 JRBaseRequest 的相关方法。

Demo: 先进行 YTKNetworkConfig 的配置
然后通过 创建 DemoRequest 和 DemoViewModel 类, 分别实现 请求接口、数据传递 和 Singal到Command 转化。

在 ViewController 实现 ViewModel 的 binding 和 execute。

Requirements

Installation

JRACRequest is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'JRACRequest'

Author

slark, [email protected]

License

JRACRequest is available under the MIT license. See the LICENSE file for more info.

About

基于ReativeObjc 和 YTKNetwork 的 OC版本 响应式网络框架

Resources

License

Stars

Watchers

Forks

Packages

No packages published