RE: Downloading html page
RE: Downloading html page
- Subject: RE: Downloading html page
- From: "Stuppel, Searle @ San Diego Central" <email@hidden>
- Date: Fri, 17 Aug 2001 12:50:58 -0700
actually cocoa can. And it is very easy. The code below works fine. I use it
in some of my own code.
{
NSString *pageToParse;
//urlToParse is passed in by the function being called
pageToParse = [NSString stringWithContentsOfURL:[NSURL
URLWithString:urlToParse]];
}
That is how i call it up. Be aware tho, that it will NOT follow redirectors
as far as I can tell. So if a page has cgi, or php, or redirects or some
such, it will probably return a value of "nil".
The questions i have about NSURL are whether it can return WHY it fails
(error 404, 403, etc.) and what MIME-TYPE it is retrieving.
searle
Searle Stuppel
CB Richard Ellis, Inc.
Direct: 858-546-4600
Fax: 858-546-4616
Toll Free: 800-334-9347
email@hidden
-----Original Message-----