Latest 3.0.8
Homepage https://github.com/lovesunstar/Network
License MIT
Platforms ios 9.0
Dependencies Alamofire
Frameworks Foundation
Authors

CI Status
Version
License
Platform

Usage

Making a Request


import Network

Network.request("https://httpbin.org/get").build()
Network.request("https://httpbin.org/get").query(["foo": "bar"]).build()
Network.request("https://httpbin.org/get").headers(["Custom-Content-Type": "application/json; encrypted=1"]).build()
Network.request("https://httpbin.org/post").post(["foo": "bar"]).encoding(.URLEncodedInURL).build()
Network.request("https://httpbin.org/post").post(["foo": "bar"]).encoding(.JSON).retry(1).build()
Network.request("https://httpbin.org/post").post(["foo": "bar"]).encoding(.JSON).priority(Network.Priority.Low).build()

// Please take a look at Network.swift for more configuration 

Response Handling


Network.request("https://httpbin.org/get").build()?.responseJSON { request, response, responseValue, error in 

}

let (response, responseData, error) = Network.request("https://httpbin.org/post").query(["foo": "bar"]).post(["encode": "json"]).encoding(.JSON).syncResponseJSON()

Requirements

Installation

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

pod "Network"

Author

Suen, [email protected]

License

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

Latest podspec

{
    "name": "Network",
    "version": "3.0.8",
    "summary": "Using network request easily",
    "description": "Using builder to simply the way to create new requests.",
    "homepage": "https://github.com/lovesunstar/Network",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Suen": "[email protected]"
    },
    "source": {
        "git": "https://github.com/lovesunstar/Network.git",
        "tag": "3.0.8"
    },
    "social_media_url": "https://twitter.com/_lovesunstar",
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "Network/Classes/**/*",
    "frameworks": "Foundation",
    "dependencies": {
        "Alamofire": []
    }
}

Pin It on Pinterest

Share This