• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSURL question with user name and pwd in the URL..
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURL question with user name and pwd in the URL..


  • Subject: Re: NSURL question with user name and pwd in the URL..
  • From: Dan Wood <email@hidden>
  • Date: Mon, 16 Sep 2002 10:46:00 -0700

I have two guesses:

1) Maybe you should try using NSURLHandle. NSURLHandle is sort of a lightweight cousin to NSURLHandle, and it doesn't support certain operations.

2) If NSURLHandle doesn't work either, I wouldn't be surprised. NSURLHandle isn't exactly a heavyweight either! You can't do HTTP posts, for instance. If that is the case, then check out my CURLHandle class, which you can plug-in to replace NSURLHandle pretty easily. You can try out your URL with the tester application that comes with it to see if it's worth your while.

<http://curlhandle.sourceforge.net/>


Regards,
Dan Wood

On Friday, September 13, 2002, at 01:43 PM, Charles Bennett wrote:

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.



--
Dan Wood
Karelia Software, LLC
email@hidden
http://www.karelia.com/
Watson for Mac OS X: http://www.karelia.com/watson/
_______________________________________________
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.

References: 
 >NSURL question with user name and pwd in the URL.. (From: Charles Bennett <email@hidden>)

  • Prev by Date: Re: Keyboard management?
  • Next by Date: Re: limit text input in NSTextView
  • Previous by thread: NSURL question with user name and pwd in the URL..
  • Next by thread: Re: <no subject>
  • Index(es):
    • Date
    • Thread