Skip to content

Latest commit

 

History

History
57 lines (34 loc) · 2.84 KB

README.md

File metadata and controls

57 lines (34 loc) · 2.84 KB

SwiftNetwork

CI Status Version Carthage Compatible License Platform

Description

SwiftNetwork is lightweight network layer in swift.

Usage

HTTPNetworkManagerCompletionBlock = (data:NSMutableData?, response:URLResponse?, error:NSError?) -> (Void)

SwiftNetwork.sharedInstance.get(<#T##urlSring: String##String#>, timeout: <#T##TimeInterval#>, completionBlock: <#T##HTTPNetworkManagerCompletionBlock##HTTPNetworkManagerCompletionBlock##(data: NSMutableData?, response: URLResponse?, error: NSError?) -> (Void)#>)

SwiftNetwork.sharedInstance.get(<#T##urlSring: String##String#>, headers: <#T##[String : String]#>, timeout: <#T##TimeInterval#>, completionBlock: <#T##HTTPNetworkManagerCompletionBlock##HTTPNetworkManagerCompletionBlock##(data: NSMutableData?, response: URLResponse?, error: NSError?) -> (Void)#>)

SwiftNetwork.sharedInstance.post(<#T##urlSring: String##String#>, body: <#T##Data#>, timeout: <#T##TimeInterval#>, completionBlock: <#T##HTTPNetworkManagerCompletionBlock##HTTPNetworkManagerCompletionBlock##(data: NSMutableData?, response: URLResponse?, error: NSError?) -> (Void)#>)

SwiftNetwork.sharedInstance.post(<#T##urlSring: String##String#>, body: <#T##Data#>, headers: <#T##[String : String]#>, timeout: <#T##TimeInterval#>, completionBlock: <#T##HTTPNetworkManagerCompletionBlock##HTTPNetworkManagerCompletionBlock##(data: NSMutableData?, response: URLResponse?, error: NSError?) -> (Void)#>)

Installation

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

pod 'SwiftNetwork'

SwiftNetwork is also available through Carthage. To install just write into your Cartfile:

github "ankitthakur/SwiftNetwork"

SwiftNetwork can also be installed manually. Just download and drop Sources folders in your project.

Author

Ankit Thakur, ankitthakur85@icloud.com

Contributing

We would love you to contribute to SwiftNetwork, check the CONTRIBUTING file for more info.

License

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