im struggling this for several hours, i want to send a json string to an asp.net server, but i always get null response. Is there anything wrong with my code?or problem in the server side? thanks a lot..
(url is hidden for security only), and this is the update code..
NSError *error;
NSDictionary* jsonDict = @{@"FundCode": @(1), @"TotalAmount":@(1000000), @"PaymentType":@(0), @"Bank":@"AAA BANK",@"BankAccountNo": @"123456789",@"Amount":@"1000000",
@"DepositFile":@"asset.PNG"};
NSData* postData = [NSJSONSerialization dataWithJSONObject:jsonDict options:kNilOptions error:&error];
NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]];
NSURL *url1 = [NSURL URLWithString:[NSString stringWithFormat:@"http://www.url.com"]];
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url1];
[request setHTTPMethod:@"POST"];
[request setValue:postLength forHTTPHeaderField:@"Content-Length"];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
[request setHTTPBody:postData];