function public function SerializedResponse::getMimeType

8.x-3.x SerializedResponse.php public SerializedResponse::getMimeType()

Retrieves the MIME type from the response Content-Type header.

Return value

string The MIME type.

Class

SerializedResponse
Class SerializedResponse.

Namespace

Drupal\bootstrap

Source src/SerializedResponse.php (line 186)

public function getMimeType() {
  $types = explode(';', $this->headers->get('Content-Type', ''));
  return reset($types) ? : NULL;
}