anyone have any experience with this? as far as i can see, the HTTPBody isn't being recognized by the server at all. my code is:
Code:
NSString *urlString = @"http://server-dev.hq.comp.com/analytics/";
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString]
cachePolicy:NSURLRequestReloadIgnoringLocalCacheData
timeoutInterval:60.0];
[request setHTTPMethod:@"POST"];
//NSString *httpBody = [NSString stringWithFormat:@"saw.dll?Go&NQUser=%@&NQPassword=%@", username, password];
NSString *httpBody = [NSString stringWithFormat:@"fjakldfjakfja;dlkfja;dlkfjadkl;f"];
[request setHTTPBody:[httpBody dataUsingEncoding:NSUTF8StringEncoding]];
NSURLConnection *connection = [NSURLConnection connectionWithRequest:request delegate:self];
the response i get from this is the login page, so it obviously isn't seeing my username and password. when i send the junk string, no difference.
is there something i'm missing here?
and on the subject, how would you send something like a typical request form, like:
Code:
<input type="hidden" name="NQUser" value="mestel">
<input type="hidden" password="NQPassword" value="mypass">