Skip to content

Latest commit

 

History

History
36 lines (31 loc) · 952 Bytes

README.md

File metadata and controls

36 lines (31 loc) · 952 Bytes

LRConnection

Pod Version

  • LRConnection is an HTTP library that makes networking for iOS easier

Installation

  • Podfile
pod 'LRConnection'
  • Manually

add LRConnection.framework to "General->Embedded Binaries"

Requirements

  • Minimum iOS 8.0

Making HTTP Requests

  • Objective-C
LRConnectionManager *manager = [LRConnectionManager sharedManager];
[manager requestForUrl:urlString method:LRHTTPMethodGET params:params progress:nil success:^(NSData * _Nonnull data) {
    // success callback
} failure:^(NSError * _Nonnull error) {
    // failure callback
}];
  • Swift
let manager = LRConnectionManager.shared()
manager.request(forUrl: urlString, method: .GET, params: params, progress: nil, success: { (data) in
    // success callback
}, failure: { (error) in
    // failure callback
})