Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstevens committed Dec 15, 2012
1 parent 34809d8 commit 6da64d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -2,6 +2,8 @@

Adds a Sinatra-inspired routing API on top of [CocoaHTTPServer](https://github.com/robbiehanson/CocoaHTTPServer).

Supports iOS 4+ and OS X 10.7+

## Installation

1. Add [CocoaHTTPServer](https://github.com/robbiehanson/CocoaHTTPServer) to your project
Expand Down Expand Up @@ -49,7 +51,7 @@ Routes can also be handled with selectors:
[response respondWithString:@"Hello!"];
}

The RouteRequest and RouteResponse headers show what's available through these objects. Responses can respond with an NSString or NSData object, a path to a file, or an existing HTTPResponse class. Responses can also be empty as long as a status code or custom header is set. For example, to perform a redirect:
RouteResponses can respond with an NSString or NSData object, a path to a file, or an existing HTTPResponse class. Responses can also be empty as long as a status code or custom header is set. For example, to perform a redirect:

[http get:@"/old" withBlock:^(RouteRequest *request, RouteResponse *response) {
[response setStatusCode:302]; // or 301
Expand Down

0 comments on commit 6da64d8

Please sign in to comment.