src/Valkyrja/Http/NativeRequest.php
public function getRequestFormat(string $default = 'html'): string
    {
        if (null === $this->format) {
            $this->format = $this->attributes->get('_format', $default);
        }

        return $this->format;
    }
public function getRequestFormat(string $default = 'html'): string
    {
        if (null === $this->format) {
            $this->format = $this->attributes->get('_format', $default);
        }

        return $this->format;
    }
Gets the request format.

@param string $default The default format

@return string