TacoShell 0.0.7

TacoShell 0.0.7

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Marcus Kida.



TacoShell 0.0.7

Usage

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?

Requirements

  • CocoaPods

Installation

Author

Marcus Kida, [email protected]

License

TacoShell is available under the MIT license. See the LICENSE file for more info.