ringfinger/api/v1/index.php

16 lines
378 B
PHP
Raw Normal View History

2020-08-17 23:46:58 +02:00
<?php
2020-08-19 21:06:45 +02:00
require '../../backend/classes/core/Autoloader.php';
2020-08-17 23:46:58 +02:00
2020-08-19 21:06:45 +02:00
$autoloader = new Autoloader('../../backend/cache/');
2020-08-17 23:46:58 +02:00
$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();