Add support for request variants

Minor thing, but would you mind wrapping the example code within an actual `PagesController` class to follow the convention of the other examples?