Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NSString *urlString1 = [NSString stringWithFormat: @"%@/product/product_id",APIDomainURL];
- NSDictionary *jsonBodyDict = @{@"product_id":_productID,@"code":[[NSUserDefaults standardUserDefaults] stringForKey:@"selectedCountry"]};
- NSData *jsonBodyData = [NSJSONSerialization dataWithJSONObject:jsonBodyDict options:kNilOptions error:nil];
- NSMutableURLRequest *request = [NSMutableURLRequest new];
- request.HTTPMethod = @"POST";
- [request setURL:[NSURL URLWithString:urlString1]];
- //NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dictionary options:0 error:&error];
- if (jsonBodyData) {
- productHistoryAry = [NSJSONSerialization JSONObjectWithData:jsonBodyData options:kNilOptions error:&error];
- NSLog(@"Get value here:%@", productHistoryAry);
- } else {
- NSLog(@"Unable to get %@: %@", jsonBodyDict, error);
- }
Add Comment
Please, Sign In to add comment