Chapter 17. The Request Handler Component

Table of Contents

17.1. Introduction
17.2. Getting Client/Request Information
17.3. Stripping Data
17.4. Other Useful Functions

17.1. Introduction

The Request Handler component is used in Cake to determine information about the incoming HTTP request. You can use it to better inform your controller about AJAX requests, get information about the remote client's IP address and request type, or strip unwanted data from output. To use the Request Handler component, you'll need to make sure it is specified in your controller's $components array.

class ThingsController extends AppController
{
    var $components = array('RequestHandler');

    // ...
}