ringfinger/api/v1/index.php

16 lines
375 B
PHP
Raw Permalink 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'])) {
2020-08-23 12:37:39 +02:00
$router->setRequestBody($_SERVER['HTTP_CONTENT_TYPE'], file_get_contents('php://input'));
2020-08-17 23:46:58 +02:00
}
$router->route();