How to use Http\Server to replace Dispatcher

@kuldeep1984 jai verma
Tue, 03 Sep 2024 07:17:42 +0000

Previously I was using Dispatcher to dispatch request
$request = new Request($path);
$dispatcher = DispatcherFactory::create();
$response = new Response();
$dispatcher->dispatch(
$request,
$response
);

Now I am upgrading my cakephp application to 3.8 and want to replace this dispatcher class to ‘Http/Server’ implementation as suggested in deprecation warning.

Kindly help.