Hi, I have to make a HTTPS Post with some XML data, but I need to send the XML in the HTTP header.
Using the body I would do something like this
request = [[NSMutableURLRequest alloc] initWithURL:url cachePolicy:CACHE_POLICY timeoutInterval:TIMEOUT_INTERVAL];
NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]];
[request setHTTPMethod:@"POST"];
[request setValue:postLength forHTTPHeaderField:@"Content-Length"];
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"content-type"];
[request setHTTPBody:postData];
connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
But this does not work for the header, anyone know how to make this? The XML is something like this
<request>
<code1>666</code1 >
<code2>656</code2 >
<code3>767</code3 >
</request >
Thanks.