Skip to content

Instantly share code, notes, and snippets.

@benatkin
Created March 23, 2010 03:52
Show Gist options
  • Save benatkin/340823 to your computer and use it in GitHub Desktop.
Save benatkin/340823 to your computer and use it in GitHub Desktop.
// This makes a call to an API, through JSON. In a single place I could change the url design, whether it's https or not, the authentication method, the serialization format, and more. Additionally, since initialization and sending happen outside of this method, the request can be touched up before or after sending it.
- (void) prepareRequest:(ASIHTTPRequest *)request withController:(NSString *)controller andAction:(NSString *)action andParams:(NSDictionary *)params;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment