ringfinger/api/v1/index.php
2020-08-17 23:46:58 +02:00

16 lines
372 B
PHP

<?php
require '../../data/classes/core/Autoloader.php';
$autoloader = new Autoloader('../../data/cache/');
$session = new Session();
$router = new Router($_SERVER['REQUEST_URI'], $_SERVER['REQUEST_METHOD']);
if (isset($_SERVER['HTTP_CONTENT_TYPE'])) {
$router->setRequestBody($_SERVER['HTTP_CONTENT_TYPE'], file_get_contents('php://input'));
}
$router->route();