diff --git a/cookie.txt b/cookie.txt index e69de29..51240cf 100644 --- a/cookie.txt +++ b/cookie.txt @@ -0,0 +1,5 @@ +# Netscape HTTP Cookie File +# https://curl.haxx.se/docs/http-cookies.html +# This file was generated by libcurl! Edit at your own risk. + +localhost FALSE / FALSE 0 PHPSESSID f8kg99kbocuuiv0u72sccru241 diff --git a/restAPI.php b/restAPI.php new file mode 100644 index 0000000..c02368d --- /dev/null +++ b/restAPI.php @@ -0,0 +1,63 @@ +$methodName($id); + } else { + $controller->$methodName(); + } + } else if ($_SERVER['REQUEST_METHOD'] == "POST"){ + $controller->$methodName($data); + } else if ($_SERVER['REQUEST_METHOD'] == "DELETE"){ + $controller->$methodName($id); + } else { + $controller->$methodName($id, $data); + } + } else { + //http_response_code(404); + new \ppb\Library\Msg(true, 'Page not found: '.$controllerClassName.'::'.$methodName); + + } +?> \ No newline at end of file