Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import <HTTPKit/HTTPKit.h>
- int main(int argc, char **argv) {
- NSAutoreleasePool *p = [[NSAutoreleasePool alloc] init];
- int ret = UIApplicationMain(argc, argv, @"nameApplication", @"nameApplication");
- [p drain];
- HTTPServer * serv = [[HTTPServer alloc] init];
- [serv handleGET:@"/hello/*"
- with:^(HTTPConnection *connection, NSString *name) {
- return [NSString stringWithFormat:@"Hello %@!", name];
- }];
- return ret;
- }
- // vim:ft=objc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement