HTTP request for ARC
Swift Ruby Objective-C
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
R9HTTPRequest.xcodeproj Renewal Oct 3, 2017
R9HTTPRequest.xcworkspace Update podfile. Oct 25, 2017
R9HTTPRequest Renewal Oct 3, 2017
R9HTTPRequestTests Renewal Oct 3, 2017
.gitignore Add pod files. Oct 4, 2017
.swift-version Renewal Oct 3, 2017
.travis.yml Modify travis yml. Oct 25, 2017
LICENSE Renewal Oct 3, 2017
Podfile Modify podfile Oct 25, 2017
Podfile.lock Modify podfile Oct 25, 2017
R9HTTPRequest.podspec Modify podspec. Oct 25, 2017
README.md Add CI setting. Oct 3, 2017

README.md

R9HTTPRequest

Version License Platform Build Status

R9HTTPRequest is an easy to use wrapper around the URLSession(a.k.a NSURLSession) API that makes some of the more tedious aspects of communicating with web servers easier. It's backed by RxSwift and RxCocoa.

Feature

REST API Client

It is suitable performing basic HTTP requests and interacting with REST-based services (GET / POST / PUT / DELETE).

let disposeBag = DisposeBag()

let client = HttpJsonClient<HttpResponse>()
let url = URL(string: "http://httpbin.org/get")!

client.get(url: url, headers: nil)
    .subscribe(onNext: { response -> Void in
        //
    }).disposed(by: disposeBag)

struct HttpResponse: Codable {
    var id = ""
    var name = ""

    // ... //
}

Installation

CocoaPods

You can install R9HTTPRequest via CocoaPods by adding it to your Podfile:

use_frameworks!

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '11.0'

pod 'R9HTTPRequest'