<?php

use api\classes\API;

session_start();
require_once "{$_SERVER['DOCUMENT_ROOT']}/api/classes/API.php";

$API = new API();

if ($API->request_method === 'GET') {
    if (isset($_SESSION['response'])) {
        echo $_SESSION['response'];
        unset($_SESSION['response']);
    } else {
        echo '[]';
    }
}