Model View Controller
I used Apache Server provided by XAMPP Control Panel V.3.2.4 whcih uses Php Version 7.
- place MVC_PHP folder inside the root of your apache server
- make sure AllowOverride All is configured inside your httpd config.
- visit
<apache_server>/MVC-PHP/todos
/todos | request method GET => response is an HTML conatining all todos
/todos/$id | request method GET => response is a HTML containing todo with id of $id
/todos | request method POST => response status 200 when success | Headers must have {todo:<string>}
/todos/$id | request method PUT => response status 200 when success | Headers must have {todo:<string>,completed:<boolean>}
/todos/$id | request method DELETE => response status 200 when success
Author: Aryan Karim
References: