protected function extractFieldInfo($header, $fieldName)
    {
        if ($header instanceof ParameterBag || $header instanceof HeaderBag) {
            $this->validateField($header, $fieldName);
            return $header->get($fieldName, '');
        }

        throw new \InvalidArgumentException('Provided request information are not valid.');
    }