Dingo\Api\Dispatcher::header PHP Method

header() public method

Set a header to be sent on the next API request.
public header ( string $key, string $value ) : Dispatcher
$key string
$value string
return Dispatcher
    public function header($key, $value)
    {
        $this->headers[$key] = $value;
        return $this;
    }

Usage Example

 /**
  * Set a header to be sent on the next API request.
  *
  * @param string $key
  * @param string $value
  * @return \Dingo\Api\Dispatcher 
  * @static 
  */
 public static function header($key, $value)
 {
     return \Dingo\Api\Dispatcher::header($key, $value);
 }