The last GUI programming I have done was with Visual Basic, which included objects like Winsock and Inet to easily connect to the internet and retrieve the source from webpages.
I just got started into XCode, and was wondering if there is a similar component. I see that there is a Webkit option in the Library, but I have no idea how to use it.
Any help would be appreciated.
I want to simulate the browser as well as possible (including cookies, headers, etc). Is the Webkit approach better than the link you just gave me? Sorry I was no more clear in the OP.
Apple has two guides in the documentation you’ll want to look at, URL Loading System and WebKit Objective-C Programming Guide. You’ll probably be most interested in the former if you want to request data from a web server behind the scenes, or the latter if you want to actually put a web browser control into your application. Both documents should explain the classes you’ll use and the general process, but let me know if you have questions.
A lot of the core Cocoa data types like NSString, NSDate, and even NSArray and NSDictionary have methods for loading data from a URL like Heng-Cheong Leong mentioned, but they abstract away all the low level stuff and probably won’t be suitable if you want to deal with HTTP headers.