O, what a tangled web we weave...!
—Sir Walter Scott, The Lay of the Last Minstrel
Ruby rose to extreme (and some might even say overhyped) popularity over the last decade or so. Although Ruby is a general-purpose language, and can be used for any programming task, the majority of Ruby’s rise to fame is the result of a single Ruby library, Ruby on Rails. Created by David Heinemeier Hansson and first released in 2004, Rails (as it is popularly known) allows developers to produce rich, interactive web applications with previously unprecedented speed.
In this chapter, we’ll examine how to respond to HTTP requests from a web browser or API client (such as a mobile application or another web service). We’ll give ...