Finally I found the solution. Thanks @Mateusz for helping me out. Here is the solution.
// Construct a request mapping for User
RKObjectMapping *requestMapping = [RKObjectMapping requestMapping];
[requestMapping addAttributeMappingsFromDictionary:@{ @"email": @"email", @"password": @"password" }];
// construct a response mapping for User
RKObjectMapping *responseMapping = [RKObjectMapping mappingForClass:[User class]];
[responseMapping addAttributeMappingsFromDictionary:@{@"email": @"email", @"password": @"password", @"guid": @"guid"}];
RKRequestDescriptor *req = [RKRequestDescriptor requestDescriptorWithMapping:requestMapping objectClass:[User class] rootKeyPath:@"user" method:RKRequestMethodPOST];
RKResponseDescriptor *res = [RKResponseDescriptor responseDescriptorWithMapping:responseMapping method:RKRequestMethodAny pathPattern:nil keyPath:@"user" statusCodes:[NSIndexSet indexSetWithIndex:200]];
// Register our descriptors with a manager
RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://localhost/api/user/"]];
[manager addRequestDescriptor:req];
[manager addResponseDescriptor:res];
// preparing sending User object
User *user = [User new];
user.email = @"example@example.com";
user.password = @"password";
NSLog(@"user email : %@", user.email);
[manager postObject:user path:@"user" parameters:@{@"api_key": MY_API_KEY} success:^(RKObjectRequestOperation *operation, RKMappingResult *result) {
NSArray *arr = [result array];
User *temp= [arr objectAtIndex:0];
NSLog(@"SUCCESS ---------------------------- User's email: %@", temp.email);
NSLog(@"User's guid: %@", temp.guid);
// NSLog(@"--------- - --- -- - all resutl: %@", result);
}
failure:^(RKObjectRequestOperation *operation, NSError *error) {
NSLog(@"failed post %@", error);
NSLog(@"%@",operation.description);
NSLog(@"%@",operation.HTTPRequestOperation.description);
}];