Put simply, REST servers send HTTP responses based on a given URL and HTTP verb. Keeping that in mind, let's start with the following chunk of code added to the rest-service/server/customer/index.php file:
<?phpif ('POST' == $_SERVER['REQUEST_METHOD']) { header('Content-type: application/json'); echo json_encode(['data' => 'Triggered customer POST!']);}if ('GET' == $_SERVER['REQUEST_METHOD']) { header('Content-type: application/json'); echo json_encode(['data' => 'Triggered customer GET!']);}if ('PUT' == $_SERVER['REQUEST_METHOD']) { header('Content-type: application/json'); echo json_encode(['data' => 'Triggered customer PUT!']);}if ('DELETE' == $_SERVER['REQUEST_METHOD']) { header('Content-type: application/json'); echo ...