Re: NSURLConnection vs WebKit
Re: NSURLConnection vs WebKit
- Subject: Re: NSURLConnection vs WebKit
- From: Jesus De Meyer <email@hidden>
- Date: Wed, 7 Feb 2007 10:31:11 +0100
I think so, I have implemented most of the delegate methods from
NSURLConnection and when trying the del.icio.us/rss/ feed I do not
get a redirect reponse. Instead the data I get is an html page
containing the standard 404 code.
Do I need to do something extra?
This is the code I'm using: (+ the delegate methods which currently
only contain NSLog's)
NSURLRequest *request = [NSURLRequest requestWithURL:[self
valueForKey:@"url"]
cachePolicy:NSURLRequestReloadIgnoringCacheData
timeoutInterval:60.0];
[data setLength:0];
NSURLConnection *connection = [NSURLConnection
connectionWithRequest:request delegate:self];
if (connection == nil) {
NSLog(@"Unavailable to make a connection!");
}
On 07 Feb 2007, at 10:26, Scott Anguish wrote:
you should be able to do this with NSUSRLConnection
are you sure you're handling things like redirects? www.foo.com
typically redirects to a specific page (e.i. www.foo.com/index.html)
On Feb 7, 2007, at 4:24 AM, Jesus De Meyer wrote:
I checked that one out but his class is very simple and doesn't
work with some feeds like, http://del.icio.us/rss/. Also, his
class doesn't handle authentication and stuff like that. So maybe
I should use WebKit anyway, that way I can also retrieve the favicon.
But if I used an instance of WebKit for every feed, would that
cause a lot of memory consumption? I could probably just use 1
instance and start parsing a feed after the previous one has
finished parsing.
Thanks in advance,
Jesus
__________________
Jesus De Meyer
www.edot-studios.com
jesus.edot-studios.com
"creativity in mind"
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden
__________________
Jesus De Meyer
www.edot-studios.com
jesus.edot-studios.com
"creativity in mind"
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden