mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-08 07:39:27 +00:00
Merge branch 'master' of https://github.com/FH-Complete/FHC-Core
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
//require_once APPPATH . '/libraries/REST_Controller.php';
|
||||
|
||||
/**
|
||||
* Testing class for REST calls and authentication
|
||||
*/
|
||||
@@ -16,37 +14,17 @@ class Test extends APIv1_Controller
|
||||
|
||||
/**
|
||||
* Test HTTP GET method
|
||||
* It responses whith the HTTP status 200 and prints this JSON string
|
||||
* {"success":true,"message":"API HTTP GET call test succeed"}
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function getTest()
|
||||
{
|
||||
$payload = [
|
||||
'success' => TRUE,
|
||||
'message' => 'API HTTP GET call test succeed',
|
||||
'error' => 0
|
||||
];
|
||||
$httpstatus = REST_Controller::HTTP_OK;
|
||||
$this->response($payload, $httpstatus);
|
||||
$this->response(success('API HTTP GET call test succeed'), REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test HTTP POST method
|
||||
* * It responses whith the HTTP status 200 and prints this JSON string
|
||||
* {"success":true,"message":"API HTTP POST call test succeed"}
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function postTest()
|
||||
{
|
||||
$payload = [
|
||||
'success' => TRUE,
|
||||
'message' => 'API HTTP POST call test succeed',
|
||||
'error' => 0
|
||||
];
|
||||
$httpstatus = REST_Controller::HTTP_OK;
|
||||
$this->response($payload, $httpstatus);
|
||||
$this->response(success('API HTTP POST call test succeed'), REST_Controller::HTTP_OK);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user