Created
April 15, 2014 13:18
-
-
Save andr-ggn/10731899 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:[NSURL URLWithString:@"http://optimizerapi.ds.trustsourcing.com"]]; | |
NSMutableURLRequest *request = [httpClient requestWithMethod:@"GET" | |
path:@"/Api/RestorePassword" | |
parameters:@{@"email":@"[email protected]"}]; | |
AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; | |
[httpClient registerHTTPOperationClass:[AFHTTPRequestOperation class]]; | |
[operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { | |
// Print the response body in text | |
NSLog(@"Response: %@", [[NSString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding]); | |
} failure:^(AFHTTPRequestOperation *operation, NSError *error) { | |
NSLog(@"Error: %@", error); | |
}]; | |
[operation start]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
545 //3000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment