Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

Build Status

SPHWNetworking

SWNetworking is an easy to use Swift HTTP client built with CocoaAsyncSockets. It is in the alpha stages and as such the API is going to change. It was built for Intercept and RESTer

Install


SPHWNetworking can be installed easily via Cocoa Pods

pod 'SPHWNetworking'

Usage


The basic usage of it is simple. You first create a request object, and to set a URL; then a method.

var request = Request()
request.url = "http://google.com"
request.method = .GET

`Then you can setup the body, which can come in two forms NSData or a string. The NSData takes precedent over the string

request.dataBody = NSData()

OR

request.body = "FOO"

Last but not least you setup your networking request.

let netRequest = NetworkingRequest(request, jar: CookieJar(), progressCB: {
progress in
// Do stuff with the progress
}) { response, body in
// Do stuff with the resulting jar and response
}
netRequest.run()

About

SWNetworking is an easy to use Swift HTTP client built with CocoaAsyncSockets

Resources

License

Packages

No packages published