Latest 2.0.0
Homepage https://github.com/BiAtoms/Request.swift
License MIT
Platforms ios 8.0, osx 10.9, tvos 9.0
Dependencies Socket.swift
Authors

Platform Linux
Platform
Cocoapods Compatible
Build Status - Master

A tiny (sync/async) HTTP client written in swift.

OS

Works in linux, iOS, macOS and tvOS

Example

client.request("http://example.com", headers: ["Accept": "text/html"]).response { response, error in    
        if let response = response {
            print(response.statusCode)
            print(String(cString: response.body))
        } else {
            print(error)
        }
    }

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate Request.swift into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
target '<Your Target Name>' do
    pod 'Request.swift' ~> '2.0'
end

Then, run the following command:

$ pod install

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. It is in early development, but Request.swift does support its use on supported platforms.

Once you have your Swift package set up, adding Request.swift as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .Package(url: "https://github.com/BiAtoms/Request.swift.git", majorVersion: 2)
]

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License – see the LICENSE file for details

Latest podspec

{
    "name": "Request.swift",
    "version": "2.0.0",
    "summary": "A (sync/async) tiny http client written in swift.",
    "homepage": "https://github.com/BiAtoms/Request.swift",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Orkhan Alikhanov": "[email protected]"
    },
    "source": {
        "git": "https://github.com/BiAtoms/Request.swift.git",
        "tag": "2.0.0"
    },
    "module_name": "RequestSwift",
    "platforms": {
        "ios": "8.0",
        "osx": "10.9",
        "tvos": "9.0"
    },
    "source_files": "Sources/*.swift",
    "dependencies": {
        "Socket.swift": [
            "~> 2.0"
        ]
    },
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This