- (void) login { NSString *userName = [[userNameField stringValue] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; NSString *password = [[passwordField stringValue]
stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; NSURL *url = [NSURL URLWithString:@"https://secure.del.icio.us/login"]; NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReturnCacheDataElseLoad timeoutInterval:30]; [urlRequest setHTTPMethod:@"POST"]; NSString *body = [NSString stringWithFormat: @"user_name=%@&" @"password=%@", userName, password]; [urlRequest setHTTPBody:[body dataUsingEncoding:NSUTF8StringEncoding]]; NSLog(@"request: [EMAIL PROTECTED]@\n%@", [urlRequest URL], [urlRequest HTTPMethod], [[[NSString alloc] initWithData:[urlRequest HTTPBody] encoding:NSUTF8StringEncoding] autorelease]); NSData *urlData; NSURLResponse *response; NSError *error; urlData = [NSURLConnection sendSynchronousRequest:urlRequest returningResponse:&response error:&error]; if (!urlData) { NSAlert *alert = [NSAlert alertWithError:error]; [alert runModal]; return; } // Parse the login result NSString *loginResult = [[[NSString alloc] initWithData:urlData encoding:NSUTF8StringEncoding] autorelease]; NSLog(@"login result: %@", loginResult); } Is there anything special about https requests in Cocoa that I must learn? Since I've verified that sending http requests in this manner is perfectly OK, and accessing https://secure.del.icio.us/login in web browsers goes well. If anyone could tell me anything that I've missed here, I'll very much appreciate that. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]