Skip to content

Commit

Permalink
Intro to the handlers section
Browse files Browse the repository at this point in the history
  • Loading branch information
cschneid committed Oct 24, 2008
1 parent 3c34416 commit d9fc016
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions book/Handlers.markdown
@@ -1,5 +1,15 @@
Handlers (controllers?)
=======================
Handlers
========

Structure
---------
Handler is the generic term that Sinatra uses for the "controllers". A
handler is the initial point of entry for new http requests into your
application.

To find more about the routes, head to the Routes section (right above
this one)


redirect
--------
Expand All @@ -18,7 +28,7 @@ browser makes a followup request to the location indicated. Since the browser
makes that followup request, you can redirect to any page, in your application,
or another site entirely.

The flow of requests is:
The flow of requests during a redirect is:
Browser --> Server (redirect to '/') --> Browser (request '/') --> Server (result for '/')

Sinatra sends a 302 response code as a redirect by default. According to the
Expand Down

0 comments on commit d9fc016

Please sign in to comment.