Skip to content

An HTTP library that makes networking for iOS easier

License

Notifications You must be signed in to change notification settings

tomrlq/LRConnection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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