Skip to content

一个基于Alamofire的Swift版本的网络请求框架

License

Notifications You must be signed in to change notification settings

Aaronwk/WKNetwork

Repository files navigation

WKNetwork

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

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

pod 'WKNetwork'

Author

王凯, wangkai@ctdcn.com

License

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

}

About

一个基于Alamofire的Swift版本的网络请求框架

Resources

License

Stars

Watchers

Forks

Packages

No packages published