2017-02-13 22:34:15 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Controllers;
|
|
|
|
|
|
|
|
|
|
|
|
class JsonRetriever {
|
|
|
|
/**
|
|
|
|
* Support POST, PUT, and PATCH request (and possibly more)
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
static function getJsonData() {
|
|
|
|
$json = file_get_contents('php://input');
|
2017-02-14 12:45:02 -05:00
|
|
|
return json_decode($json, true);
|
2017-02-13 22:34:15 -05:00
|
|
|
}
|
|
|
|
}
|