name

C code posted by ben
created at 21 Jul 06:15

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
- (void)registerUserWithEmail:(NSString *)email
                     password:(NSString *)password
                  withSuccess:(void (^)(id object))success
                      failure:(void (^)(failure failureType))failure
{
    NSDictionary *parameters = [[NSDictionary dictionaryWithObjectsAndKeys:
                                        email, @"email",
                                        password, @"password",
                                        nil];
  
    
    AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
    
    [manager POST:url parameters:parameters
          success:^(AFHTTPRequestOperation *operation, id response) {
              
              success(user);
              
          } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
           
          }];

}
868 Bytes in 2 ms with coderay