CocoaPods trunk is moving to be read-only. Read more on the blog, there are 14 months to go.
| TestsTested | ✗ |
| LangLanguage | Obj-CObjective C |
| License | MIT |
| ReleasedLast Release | Dec 2014 |
Maintained by Marcus Kida.
To run the example project, clone the repo, and run pod install from the Example directory first. For futher documentation, please visit the CocoaDocs Page.
Using TacoShell a GET request is simple as this:
TacoShell *ts = [[TacoShell alloc] initWithURL:[NSURL URLWithString:@"http://guacamole.burritokit.com/"]];
ts.completionBlock = ^(NSDictionary *dictionary, NSInteger httpResponseStatusCode, id response){
NSLog(@"Your IP Address is: %@", response[@"meta"][@"ip"]);
};
[ts start];That's it! TacoShell automatically deserialized JSON responses if the respective Content-Type contains application/json.
To perform a POST request using multipart/form-data just pass in the desired fields into the POSTDictionary:
...
ts.method = BKTSRequestMethodPOST;
ts.POSTDictionary = @{"username": "karl"};
...When no Content-Type is specified, and the POSTDictionary is set, the Content-Type will default to multipart/form-data.
If you'd like to POST the POSTDictionary as JSON in the Body then just set the Content-Type to BKTSRequestContentTypeApplicationJSON like so:
...
ts.contentType = BKTSRequestContentTypeApplicationJSON;
...Easy, isn't it?
Marcus Kida, [email protected]
TacoShell is available under the MIT license. See the LICENSE file for more info.