To run the example project, clone the repo, and run pod install from the Example directory first.
WKNetwork is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'WKNetwork'WKNetwork is available under the MIT license. See the LICENSE file for more info.
一个Alamofire的Swift版本的网络请求框架
###Appdelegate.swift 调用
WKNetwork.setupWithEnv(env: .test,
proto: .http,
host: "0.0.0.0",
port: ":8080/",
pref: ".dev",
timeOut: 90)
// 日志
WKNetwork.isLog(isLog: false)
###请求入口
WKNetwork.request({ (r) in
r.path = ""
r.responseType = .text
}, suc: { (s) in
print(s ?? "")
}) { (e) in
}