WordPress\AiClient\Providers\Http\DTO
Request::getContentType
Gets the Content-Type header value.
Method of the class: Request{}
No Hooks.
Returns
String|null. The Content-Type header value or null if not set.
Usage
// private - for code of main (parent) class only $result = $this->getContentType(): ?string;
Changelog
| Since 0.1.0 | Introduced. |
Request::getContentType() Request::getContentType code WP 7.0.4
private function getContentType(): ?string
{
$values = $this->getHeader('Content-Type');
return $values !== null ? $values[0] : null;
}