Example #1
0
 protected function headers()
 {
     $headers = parent::headers();
     //if the first parameter is true then exclude the authorization headers
     $args = func_get_args();
     if (isset($args[0]) && $args[0]) {
         return $headers;
     }
     switch ($this->method()) {
         case 'GET':
             break;
         case 'POST':
             $headers['Content-type'] = 'application/x-www-form-urlencoded; charset=' . Kurogo::getCharset();
             break;
     }
     $headers['Authorization'] = $this->getAuthorizationHeader();
     $headers['Expect'] = '';
     return $headers;
 }