Simple REST prototype
Console:
git clone [email protected]:vsguts/rest-prototype.git
- PHP 7 or higher
Start PHP builtin server:
cd public
php -S localhost:8000
And open the following URL: http://localhost:8000
Login: root
Password: root
You need to set Authorization.
Header must contain 'Basic ' . base64_encode($login . ':' . $password)
.
Example:
Authorization: Basic cm9vdDpyb290
application/json
text/plain
You need to set Accept header, to use this feature
Without Authenticate
- GET /
Authenticate required
- GET /users
- GET /users/{id} - 200 or 404
- POST /users - Exception: 400
- PUT /users/{id} - Exception: 400
- DELETE /users/{id} - 204