Locker\Request::header PHP Method

header() public method

Gets a header from the request headers.
public header ( $key, $default = null ) : mixed
$key Header to be returned.
$default Value to be returned if the header is not set.
return mixed Value of the header.
    public function header($key, $default = null)
    {
        $value = $this->getParam($key);
        // If the key is set in the payload then return it.
        if (isset($value)) {
            return $value;
        } else {
            return \Request::header($key, $default);
        }
    }