I am writing an HTTP Post request, but for some reason the parameters are not being added correctly, and I can\'t for the life of me figure out what I\'m doing wrong. Here\'
Try this
NSString *Post = [[NSString alloc] initWithFormat:@"Post Parameters"];
NSURL *Url = [NSURL URLWithString:@"Url"];
NSData *PostData = [Post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
NSString *postLength = [NSString stringWithFormat:@"%d", [PostData length]];
NSMutableURLRequest *Request = [[NSMutableURLRequest alloc] init];
[Request setURL:Url];
[Request setHTTPMethod:@"POST"];
[Request setValue:postLength forHTTPHeaderField:@"Content-Length"];
[Request setValue:@"application/json" forHTTPHeaderField:@"Accept"];
[Request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
[Request setHTTPBody:PostData];