HTTP server for a to-do list. Scala app made with Play 2 framework.
- Java 1.8
- Play Framework (DOC)
- URL : /todos
- TYPE: POST
- BODY: {"description": "Buy some milk"}
- HEADERS: Content-Type: application/json
Added -> 201 CREATED
{
"id": "1"
}
- URL : /todos/{id}
- TYPE: PUT
- BODY: {"description": "Buy some more milk"}
- HEADERS: Content-Type: application/json
Updated -> 200 OK
- URL : /todos/{id}
- TYPE: DELETE
Removed -> 200 OK
- URL : /todos
- TYPE: GET
Got all -> 200 OK
[{
"id": "2",
"description": "Watch Sherlock.",
"Date": "2016/06/01 07:11:29"
},
{
"id": "1",
"description": "Buy some milk!",
"Date": "2016/06/01 07:10:29"
}]
- URL : /history/todos
- TYPE: GET
Got all -> 200 OK
[{
"id": "4",
"description": "DELETE",
"itemId": "2",
"Date": "2016/06/01 07:20:29"
},
{
"id": "3",
"description": "UPDATE",
"itemDescription": "Buy some more milk!",
"itemId": "1",
"Date": "2016/06/01 07:13:29"
},
{
"id": "2",
"description": "ADD",
"itemDescription": "Watch Sherlock.",
"itemId": "2",
"Date": "2016/06/01 07:11:29"
},
{
"id": "1",
"description": "ADD",
"itemDescription": "Buy some milk!",
"itemId": "1",
"Date": "2016/06/01 07:10:29"
}]