- Added new protected method getPostJSON to FHC_Controller to get POSTed JSON

- application/controllers/components/Filter.php now makes use of getPostJSON from the FHC_Controller
- RESTClient now POST a JSON request
- public/js/components/filter/Filter.js improvements
This commit is contained in:
Paolo
2022-07-11 14:54:14 +02:00
parent cfe7c6b9a4
commit 198c6baf3d
9 changed files with 626 additions and 518 deletions
+10
View File
@@ -159,6 +159,15 @@ abstract class FHC_Controller extends CI_Controller
return false;
}
/**
* Return the JSON decoded HTTP POST request
* If the request is not in JSON format then a null value is returned
*/
protected function getPostJSON()
{
return json_decode($this->input->raw_input_stream);
}
//------------------------------------------------------------------------------------------------------------------
// Private methods
@@ -175,3 +184,4 @@ abstract class FHC_Controller extends CI_Controller
}
}
}