Build sample app through BUCK
Summary: This diff adds capabilty to build sample app through BUCK. Reviewed By: passy Differential Revision: D13697307 fbshipit-source-id: d7008bb4709b13384f65051631b365a0eceddfff
This commit is contained in:
committed by
Facebook Github Bot
parent
21dfe41fb4
commit
f47de92117
@@ -42,14 +42,14 @@
|
||||
[urlRequest setHTTPBody:postData];
|
||||
[urlRequest setHTTPMethod:@"POST"];
|
||||
__weak NetworkViewController *weakSelf = self;
|
||||
[[[NSURLSession sharedSession] dataTaskWithRequest:urlRequest completionHandler:^(NSData *_Nullable data, NSURLResponse *_Nullable response, NSError *_Nullable error) {
|
||||
[[[NSURLSession sharedSession] dataTaskWithRequest:urlRequest completionHandler:^(NSData *_Nullable data, NSURLResponse *_Nullable response, NSError *_Nullable dataTaskError) {
|
||||
|
||||
if (error || !data) {
|
||||
if (dataTaskError || !data) {
|
||||
UIAlertController *alertController = [weakSelf alertControllerForMessage:@"Received error in POST API response"];
|
||||
[weakSelf presentViewController:alertController animated:true completion:nil];
|
||||
return;
|
||||
}
|
||||
NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error];
|
||||
NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:data options:0 error:&dataTaskError];
|
||||
NSLog(@"MSG-POST: %@", dict[@"msg"]);
|
||||
|
||||
UIAlertController *alertController = [weakSelf alertControllerForMessage:@"Received response from POST API"];
|
||||
|
||||
Reference in New Issue
Block a user