CodeIgniter 4 includes REST support out of the box and therefore does not require the RestServer.
From within any of your Controller methods, initialize library using the CodeIgniter's standard way. You MUST pass data as an array via the second parameter and it ...