Releases: 3lvis/Networking
Releases · 3lvis/Networking
Networking — 0.8.1
- Available in all the platforms!
Networking — 0.8.0
- Logger: Handle generic logging when networking errors happen => #21
Networking — 0.7.0
- Replaced NSURLConnection with NSSession + data tasks.
- Added support for synchronous POSTs being run in test environments.
Networking — 0.6.1
- Fixes an issue where responses from POST would be inferred as NSDictionary instead of AnyObject. This issue was reported by @oromero 🎉
Networking — 0.6.0
- Add method to construct a URL using a path
Networking — 0.5.1
- Return completion blocks in main thread
Networking — 0.5.0
- Added basic POST functionality
- [REQUIRES XCODE 7] Migrated to Swift 2
Networking — 0.4.0
- Swift rewrite
Networking — 0.3.0
- Added support for stubbing GET requests
Interface
+ (void)stubGET:(NSString *)path response:(id)JSON;
How to use
NSArray *stories = @[@{@"id" : @47333,
@"title" : @"Site Design: Aquest",
@"created_at" : @"2015-04-06T13:16:36Z",
@"submitter_display_name" : @"Chris A."}];
[Networking stubGET:@"/stories" response:@{@"stories": stories}];
Networking *networking = [[Networking alloc] initWithBaseURL:@"https://api-news.layervault.com/api/v2"];
[networking GET:@"/stories"
completion:^(id JSON, NSError *error) {
// Stories with id: 47333
}];
}
Networking — 0.2.0
- Added
get
endpoint