Cocoa and Cocoa Touch class to handle twined NSURLConnection delegate routing and provides easy to implement delegate methods. Deprecated.
Objective-C C
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Provides a class to handle complex (although not much) NSURLConnection delegate routing and provides two, quick to implement, delegate methods with success or failure report, along with concerned connection data (response status code, response data, NSURLRequest instance)

Also check out to pair this up with!


  • An apple computer


  • Kick it!
/* Prepare a NSURLRequest (or GSFormDataRequest) instance here */

// Now.
GSHTTPRequest *HTTPRequest = [[GSHTTPRequest alloc] initWithURLRequest:request delegate:self]; // Yes, it's not released here.
[HTTPRequest startURLConnection];
  • Handle delegate methods
 - (void)requestSucceeded:(NSDictionary *)theResponse HTTPRequest:(id)HTTPRequest {
  // Handle success.
  [HTTPRequest release];
 - (void)requestFailed:(NSDictionary *)response HTTPRequest:(id)HTTPRequest {
  // Handle failure.
  [HTTPRequest release];

The response NSDictionary argument contains three objects, "responseStatusCode", "responseString" and "request". Maybe response shouldn't parse the data into NSString (as "responseString"). Trivial change, if you need it.


Find me on Twitter: Or use the form at to talk privately wink


Copyright (c) 2010 Gurpartap Singh,

This code is licensed under the MIT License

You are free:

  • to Share — to copy, distribute and transmit the work
  • to Remix — to adapt the work

Under the following conditions:

  • The copyright notice and license shall be included in all copies or substantial portions of the software.
  • Any of the above conditions can be waived if you get permission from the copyright holder.

See bundled MIT-LICENSE.txt file for detailed license terms.