CocoaPods trunk is moving to be read-only. Read more on the blog, there are 14 months to go.
| TestsTested | ✗ |
| LangLanguage | Obj-CObjective C |
| License | MIT |
| ReleasedLast Release | Jun 2015 |
Maintained by Josip Bernat.
JBMessage is simple iOS networking wrapper based on AFNetworking. It allows you to simplify your networking code and forces you to rearrange each API call into separate class.
platform :ios, '6.0'
pod 'JBMessage', '~> 1.0'GET Request JBMessage *message = [JBMessage messageWithURL:[NSURL URLWithString:@"http://example.com/resources.json"]
parameters:@{@"foo": @"bar"}
responseBlock:^(id responseObject, NSError *error) {
NSLog(@"%@", responseObject);
}];
message.httpMethod = JBHTTPMethodGET;
[message send];POST Request JBMessage *message = [JBMessage messageWithURL:[NSURL URLWithString:@"http://example.com/resources.json"]
parameters:@{@"foo": @"bar"}
responseBlock:^(id responseObject, NSError *error) {
NSLog(@"%@", responseObject);
}];
message.httpMethod = JBHTTPMethodPOST;
[message send];PUT Request JBMessage *message = [JBMessage messageWithURL:[NSURL URLWithString:@"http://example.com/resources.json"]
parameters:@{@"foo": @"bar"}
responseBlock:^(id responseObject, NSError *error) {
NSLog(@"%@", responseObject);
}];
message.httpMethod = JBHTTPMethodPUT;
[message send];DELETE Request JBMessage *message = [JBMessage messageWithURL:[NSURL URLWithString:@"http://example.com/resources.json"]
parameters:@{@"foo": @"bar"}
responseBlock:^(id responseObject, NSError *error) {
NSLog(@"%@", responseObject);
}];
message.httpMethod = JBHTTPMethodDELETE;
[message send];