w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Sending a NSMutableURLRequest request with "Body Requests"

Try this:-

NSMutableDictionary *channelId = [[NSMutableDictionary
alloc]init];
[channelId setObject:@"UCJZ7f6NQzGKZnFXzFW9y9UQ" forKey:@"channelId"];
NSMutableDictionary *resourceId = [[NSMutableDictionary alloc]init];
[resourceId setObject:channelId forKey:@"resourceId"];

NSDictionary * postDictionary = [NSDictionary
dictionaryWithObject:resourceId forKey:@"snippet"];

NSError * error = nil;
NSData * jsonData = [NSJSONSerialization dataWithJSONObject:postDictionary
options:NSJSONWritingPrettyPrinted error:&error];
[request setHTTPBody:jsonData];




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.