• 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: [NSString stringWithContentsOfURL:] question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NSString stringWithContentsOfURL:] question


  • Subject: Re: [NSString stringWithContentsOfURL:] question
  • From: Marc Weil <email@hidden>
  • Date: Thu, 13 Feb 2003 16:01:19 -0500

But I am using an NSURL.

NSString *serverSideList = [NSString stringWithContentsOfURL:[NSURL
URLWithString:@"http://www.northsoftproductions.com/cgi-bin/example.cgi";]];

And btw, when I access the text file directly, the data downloads fine, so
it must be a program with the Perl script. Strange.

-- Marc Weil


On 2/13/03 3:19 PM, "Scott Anguish" <email@hidden> wrote:

> The problem is that stringWithContentsofURL: only works with file://
> scheme URLS, and not with http or the other schemes
>
> You'll need to use NSURL to download the data, convert the NSData to an
> NSString and then go to town.
>
>
> On Thursday, February 13, 2003, at 01:34 PM, Marc Weil wrote:
>
>> That file doesn't exist because I can't give the URL to the *real*
>> script.
>> It's secret :-D. So I just typed in a fake one.
>>
>> The reason why I thought it was expecting an NSString in the file is
>> people
>> stringWithContentsOfURL seems to parallel stringWithContentsOfFile.
>> Maybe
>> I'll try to access the text file directly rather than going through a
>> script
>> to see if that works. At least then I will be able to tell whether it
>> is a
>> problem with the Perl script or a problem with receiving plaintext
>> using
>> NSString.
_______________________________________________
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.

  • Follow-Ups:
    • Re: [NSString stringWithContentsOfURL:] question
      • From: Scott Anguish <email@hidden>
References: 
 >Re: [NSString stringWithContentsOfURL:] question (From: Scott Anguish <email@hidden>)

  • Prev by Date: Re: [NSString stringWithContentsOfURL:] question
  • Next by Date: Re: [NSString stringWithContentsOfURL:] question
  • Previous by thread: Re: [NSString stringWithContentsOfURL:] question
  • Next by thread: Re: [NSString stringWithContentsOfURL:] question
  • Index(es):
    • Date
    • Thread