3 namespace Drupal\default_format_test;
5 use Drupal\Core\Cache\CacheableResponse;
6 use Symfony\Component\HttpFoundation\Request;
8 class DefaultFormatTestController {
10 public function content(Request $request) {
11 $format = $request->getRequestFormat();
12 return new CacheableResponse('format:' . $format, 200, ['Content-Type' => $request->getMimeType($format)]);