WordPress\AiClient\Providers\Http\DTO

Request::getContentType │ private │ WP 0.1.0

Gets the Content-Type header value.

Метод класса: Request{}

Хуков нет.

Возвращает

string|null. The Content-Type header value or null if not set.

Использование

// private - только в коде основоного (родительского) класса
$result = $this->getContentType(): ?string;

Список изменений

С версии 0.1.0 Введена.

Код Request::getContentType() WP 7.1.4

private function getContentType(): ?string
{
    $values = $this->getHeader('Content-Type');
    return $values !== null ? $values[0] : null;
}