protected function ifNoneMatch(Request $request, Response $response, string $etag): Response
    {
        $ifNoneMatch = $request->getHeaderLine('If-None-Match');
        if ($ifNoneMatch && $etag === $ifNoneMatch) {
            return $response->withStatus(304, "Not Modified");
        }
        return $response;
    }