A very simple web service boilerplate.
All requests should include an action parameter. Other parameters depend upon the request method.
Response is in JSON format.
{"result":{"status":true,"message":"Application is healthy!"}}
- Create a new php file in services folder.
- Write you custom method.
- Register this method so it is callable.
global $app;
$app->registerService( 'test' );
- All custom methods that are callable via API, must use response object.
$r = responseObject();
$r->response['status'] = APP_OK;
$r->response['message'] = 'Application is healthy!';