Saturday, September 21, 2019

RestKit RequestDescriptor Mappings

-(RKRequestDescriptor *)getMetricsRequestDescriptor
{
    RKObjectMapping *requestMapping = [RKObjectMapping requestMapping];
    [requestMapping addAttributeMappingsFromArray:@[@"Id", @"Type",@"tok", @"CmID"]];

    RKRequestDescriptor *requestDescriptor = [RKRequestDescriptor requestDescriptorWithMapping:requestMapping objectClass:[class_metrics_param class] rootKeyPath:nil method:RKRequestMethodPOST];

    return requestDescriptor;

}

No comments:

Post a Comment