NSURL question with user name and pwd in the URL..
NSURL question with user name and pwd in the URL..
- Subject: NSURL question with user name and pwd in the URL..
- From: Charles Bennett <email@hidden>
- Date: Fri, 13 Sep 2002 16:43:37 -0400
Hi all, I just can't seem to get this to work.
and I'm wondering if anyone has tried it under 10.2
I'm just trying to include the user name and pass word in the URL so I
can download a protected url without user interaction. I cannot
unprotect the url..
assuming that usr and pwd are stand in's for the real user name and pass
word.
NSURL *theUrl;
NSData *urlData;
I tried
theUrl = [NSURL URLWithString:@"
http://usr:email@hidden.0.1/index.html"];
and (taken from an example found in the archives at mamasam)
theUrl = [NSURL URLWithString:@"
http://usr:pwd/192.168.0.1/index.html"];
In either case, asking for the data
urlData = [theUrl resourceDataUsingCache:FALSE];
always returns nil
Any pointers, example or pointers to the correct documentation would
be welcome.
I know that the url I'm trying to reference works, if I try to browse to
it, I get the usual login dialog box. I have verified the password and
name are correct.
I searched mamasam and the tech docs at Apple, but didn't find any
examples at Apple.
Thanks,
Chuck
--
UPS Management software for OS X
http://www.powerguardian.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.