CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.
TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Aug 2016 |
Maintained by lweisNoN.
A Objective-C wrapper around AFNetworking 3.0
[RMBaseManagerConfig sharedInstance].baseURL = @"";
[RMBaseManagerConfig sharedInstance].baseTokenKeyAndValue = @{@"accessToken":@"foo"};
@required
@interface RMNetServiceFoo1API : RMBaseRequest <RMAPIConfig>
@end
In implementation of the subclass add config:
- (NSString *)requestURL
{
return @"";
}
- (BOOL) isHTTPS
{
return YES;
}
- (RMRequestMethod)requestMethod
{
return RMRequestMethodPost;
}
- (RMRequestSerializerType)requestSerializerType
{
return RMRequestSerializerTypeJSON;
}
- (RMResponseSerializerType)responseSerializerType
{
return RMResponseSerializerTypeHTTP;
}
- (NSString *)baseURL
{
return @"https://www.foo.com";
}
- (NSDictionary *)tokenKeyAndValue
{
return @{@"accessToken":@"foo"};
}
- (id)parameters
{
return fooParams;
}
- (RMAFFormDataBlock)rmAFFormDataBlock
{
return fooBlock;
}
- (NSTimeInterval)timeoutInterval
{
return fooTimeInterval;
}
Implementation RMRequestDelegate or block to handle reponse
<RMRequestDelegate>
- (void)requestDidSuccess:(RMBaseRequest *)request
{
NSLog(@"%@",request.responseObject);
}
- (void)requestDidFailure:(RMBaseRequest *)request
{
NSLog(@"%@",request.error);
}
[[RMNetStatus sharedInstance] startRMNetworkMonitor];
MIT <<<<<<< HEAD
origin/master