Latest 0.1.2
Homepage https://github.com/wisesascha/SPHWNetworking
License MIT
Platforms osx 10.10
Dependencies CocoaAsyncSocket, GZIP
Authors

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()

Latest podspec

{
    "name": "SPHWNetworking",
    "version": "0.1.2",
    "summary": "A simple and easy to use networking library written in Swift",
    "description": "SPHWNetworking is a simple HTTP client that is written from scratch using CocoaAsyncSocket",
    "homepage": "https://github.com/wisesascha/SPHWNetworking",
    "license": "MIT",
    "authors": {
        "wisesascha": "[email protected]"
    },
    "platforms": {
        "osx": "10.10"
    },
    "source": {
        "git": "https://github.com/wisesascha/SPHWNetworking.git",
        "tag": "0.1.2"
    },
    "source_files": [
        "Networking",
        "Networking/**/*.{h,m}"
    ],
    "exclude_files": "",
    "dependencies": {
        "CocoaAsyncSocket": [
            "7.4.3"
        ],
        "GZIP": []
    }
}

Pin It on Pinterest

Share This