Use $response instead of $request.