title: accessing parameters passed with REST delete request in PHP method
body: <p>I am using codeigniter to develop some RESTful services. I have base controller which invokes different methods in child controller based on the HTTP Request(GET, POST, DELETE, PUT). Below is the code for child controller. </p>
  
  <pre><code>     class Example extends REST_Controller
              {
                  private $username;
                  private $password;
  
                  private $time_format;
                  private $date_format;
  
                  private $tz;
                  private $tz_utc;
  
                  private $prefs;
  
                  function __construct() {
                      parent::__construct();
                      // mod_php
                      if ($this-&gt;input-&gt;server('PHP_AUTH_USER'))
                      {
                          $this-&gt;username = $this-&gt;input-&gt;server('PHP_AUTH_USER');
                          $this-&gt;password = $this-&gt;input-&gt;server('PHP_AUTH_PW');
                      }
  
                      // most other servers
                      elseif ($this-&gt;input-&gt;server('HTTP_AUTHENTICATION'))
                      {
                          if (strpos(strtolower($this-&gt;input-&gt;server('HTTP_AUTHENTICATION')), 'basic') === 0)
                          {
                              list($this-&gt;username, $this-&gt;password) = explode(':',     base64_decode(substr($this-&gt;input-&gt;server('HTTP_AUTHORIZATION'), 6)));
                          }
                      }
                      // FIXME: Does this case appear ? We are already validating in Parent class
                      // @see REST_Controller:220,213
                      if ( $this-&gt;username == null || $this-&gt;password == null) {
                          $this-&gt;output-&gt;set_output(json_encode(' Unauthorized access '));
                      }
  
                      $this-&gt;date_format = $this-&gt;dates-&gt;date_format_string('date');
                      $this-&gt;time_format = $this-&gt;dates-&gt;time_format_string('date');
  
                      $this-&gt;tz = $this-&gt;timezonemanager-&gt;getTz(
                                      $this-&gt;config-&gt;item('default_timezone'));
                      $this-&gt;tz_utc = $this-&gt;timezonemanager-&gt;getTz('UTC');
                      // we are not loading any user preferences
                      //$this-&gt;prefs =
                      //Preferences::singleton($this-&gt;session-&gt;userdata('prefs'));
  
                      $this-&gt;load-&gt;library('caldav');
  
                      $this-&gt;output-&gt;set_content_type('application/json');
                  }
  
                  /**
                   *  Fetches all calendars of logged in user
                   */
                  function allcalendar_get()
                  {
                      $arr_calendars = $this-&gt;caldav-&gt;all_user_calendars(
                                      $this-&gt;username,
                                      $this-&gt;password);
                      $this-&gt;output-&gt;set_output(json_encode($arr_calendars));
                  }
                  /**
                   * Creates a calendar
                   */
                  function newcalendar_post()
                  {
  
                      // Get current own calendars
                      $current_calendars = $this-&gt;caldav-&gt;get_own_calendars(
                                      $this-&gt;username,
                                      $this-&gt;password
                      );
                  }
                  // deletes a resource
                  function event_delete() {
                      if (!$this-&gt;get('href'))
                      {  // response is 400 eventhough I pass href in url like below
                         // http://localhost/app/index.php/example/event?href=89290E
                         $this-&gt;response(NULL, 400);
                      }
                  }
     } 
  </code></pre>
  
  <p>I am trying to access the href parameter passed in url inside event_delete method using $this->get('href'), but value passed is empty. Please suggest me better way of passing parameters to DELETE REST call.</p>