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
NSURL *url = [NSURL URLWithString:@"http://localhost:3000/users/sign_in.json"]; | |
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; | |
[request setHTTPMethod:@"POST"]; | |
NSString *postString = @"user[email][email protected]&user[password]=halo123123"; | |
[request setHTTPBody:[postString dataUsingEncoding:NSUTF8StringEncoding]]; | |
AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) { | |
NSString *status = [JSON valueForKeyPath:@"success"]; | |
NSLog(@"status = %@", status); | |
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
<?php | |
// this script was created by Akbar Taufiq Herlangga (Software Engineer at Qiscus) | |
// this script was created for the Qiscus TechTalk #35 - Build Your Own MVC Framework | |
////////////////////////////////////////////////////////////////////// | |
//////////////////////////// M O D E L /////////////////////////////// |