Re: Sending a GET or POST HTTP request with Cocoa
Hi Brad, I'm just curious... having NSURLConnection and friends working, is there a specific reason you decided to switch to sockets? Is there something in Cocoa that you think is missing? Cheers, -- Tito On Sep 1, 2008, at 9:02, Brad Gibbs <[EMAIL PROTECTED]> wrote: You might find the discussion here helpful: http://deusty.blogspot.com/search/label/NSURLRequest After getting NSURL's to work, I decided I'd be better off with TCP sockets. If you find yourself in the same position, you might try AsyncSockets (also available at the link above). It's non-blocking, fast, easy and reliable. Todd Ditchendorf also created some very useful tools for working with XMLRPC and SOAP servers, available here: http://scan.dalo.us/ Brad On Aug 31, 2008, at 9:30 AM, Sam Schroeder wrote: Hi all, I'm new to Cocoa development and I'm trying to learn the basics of sending HTTP GETs and POSTs from Cocoa. I've been reading up on NSURL and searching for decent sample code. However, I've been unable to find something simple that _just_ explains how to send a GET and capture the returned results. My google_fu is weak. My ultimate goal is to send and receive XML (or maybe JSON) requests over HTTP, but first I want to understand simple GETs and POSTs. Any links or sample code would be greatly appreciated. -- Thanks, Sam ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/bradgibbs%40mac.com This email sent to [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/tciuro%40mac.com This email sent to [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Sending a GET or POST HTTP request with Cocoa
You might find the discussion here helpful: http://deusty.blogspot.com/search/label/NSURLRequest After getting NSURL's to work, I decided I'd be better off with TCP sockets. If you find yourself in the same position, you might try AsyncSockets (also available at the link above). It's non-blocking, fast, easy and reliable. Todd Ditchendorf also created some very useful tools for working with XMLRPC and SOAP servers, available here: http://scan.dalo.us/ Brad On Aug 31, 2008, at 9:30 AM, Sam Schroeder wrote: Hi all, I'm new to Cocoa development and I'm trying to learn the basics of sending HTTP GETs and POSTs from Cocoa. I've been reading up on NSURL and searching for decent sample code. However, I've been unable to find something simple that _just_ explains how to send a GET and capture the returned results. My google_fu is weak. My ultimate goal is to send and receive XML (or maybe JSON) requests over HTTP, but first I want to understand simple GETs and POSTs. Any links or sample code would be greatly appreciated. -- Thanks, Sam ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/bradgibbs%40mac.com This email sent to [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Sending a GET or POST HTTP request with Cocoa
it's URL, set it's "its" Jaime Magiera Sensory Research http://www.sensoryresearch.net ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Sending a GET or POST HTTP request with Cocoa
On Aug 31, 2008, at 12:30 PM, Sam Schroeder wrote: However, I've been unable to find something simple that _just_ explains how to send a GET and capture the returned results. My google_fu is weak. My ultimate goal is to send and receive XML (or maybe JSON) requests over HTTP, but first I want to understand simple GETs and POSTs. Hello, The easiest way for non-network programmers is probably NSMutableURLRequest. You simply instantiate an NSMutableURLRequest object, set it's URL, set it's HTTP method and away you go. http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSMutableURLRequest_Class/Reference/Reference.html - (void)setHTTPMethod:(NSString *)method hope that helps, Jaime Magiera Sensory Research http://www.sensoryresearch.net ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: Sending a GET or POST HTTP request with Cocoa
8/31/08 10:30 AM, also sprach [EMAIL PROTECTED]: > I'm new to Cocoa development and I'm trying to learn the basics of > sending HTTP GETs and POSTs from Cocoa. I've been reading up on NSURL > and searching for decent sample code. However, I've been unable to > find something simple that _just_ explains how to send a GET and > capture the returned results. My google_fu is weak. My ultimate goal > is to send and receive XML (or maybe JSON) requests over HTTP, but > first I want to understand simple GETs and POSTs. > > Any links or sample code would be greatly appreciated. http://developer.apple.com/documentation/Cocoa/Conceptual/URLLoadingSystem/U RLLoadingSystem.html HTH, Keary Suska Esoteritech, Inc. "Demystifying technology for your home or business" ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Sending a GET or POST HTTP request with Cocoa
Hi all, I'm new to Cocoa development and I'm trying to learn the basics of sending HTTP GETs and POSTs from Cocoa. I've been reading up on NSURL and searching for decent sample code. However, I've been unable to find something simple that _just_ explains how to send a GET and capture the returned results. My google_fu is weak. My ultimate goal is to send and receive XML (or maybe JSON) requests over HTTP, but first I want to understand simple GETs and POSTs. Any links or sample code would be greatly appreciated. -- Thanks, Sam ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]