Gets the request format.
Here is the process to determine the format:
@api
string $default The default format:
string The request format
public function getRequestFormat($default = 'html') {
if (null === $this->format) {
$this->format = $this
->get('_format', $default);
}
return $this->format;
}