|
2 | 2 | > For windows use `Git Bash` |
3 | 3 |
|
4 | 4 | #### get All Users |
5 | | -`curl -s http://localhost:8080/topjava/rest/admin/users` |
| 5 | +`curl -s http://localhost:8080/topjava/rest/admin/users --user admin@gmail.com:admin` |
6 | 6 |
|
7 | 7 | #### get Users 100001 |
8 | | -`curl -s http://localhost:8080/topjava/rest/admin/users/100001` |
| 8 | +`curl -s http://localhost:8080/topjava/rest/admin/users/100001 --user admin@gmail.com:admin` |
9 | 9 |
|
10 | 10 | #### get All Meals |
11 | | -`curl -s http://localhost:8080/topjava/rest/profile/meals` |
| 11 | +`curl -s http://localhost:8080/topjava/rest/profile/meals --user user@yandex.ru:password` |
12 | 12 |
|
13 | 13 | #### get Meals 100003 |
14 | | -`curl -s http://localhost:8080/topjava/rest/profile/meals/100003` |
| 14 | +`curl -s http://localhost:8080/topjava/rest/profile/meals/100003 --user user@yandex.ru:password` |
15 | 15 |
|
16 | 16 | #### filter Meals |
17 | | -`curl -s "http://localhost:8080/topjava/rest/profile/meals/filter?startDate=2020-01-30&startTime=07:00:00&endDate=2020-01-31&endTime=11:00:00"` |
| 17 | +`curl -s "http://localhost:8080/topjava/rest/profile/meals/filter?startDate=2020-01-30&startTime=07:00:00&endDate=2020-01-31&endTime=11:00:00" --user user@yandex.ru:password` |
18 | 18 |
|
19 | 19 | #### get Meals not found |
20 | | -`curl -s -v http://localhost:8080/topjava/rest/profile/meals/100008` |
| 20 | +`curl -s -v http://localhost:8080/topjava/rest/profile/meals/100008 --user user@yandex.ru:password` |
21 | 21 |
|
22 | 22 | #### delete Meals |
23 | | -`curl -s -X DELETE http://localhost:8080/topjava/rest/profile/meals/100002` |
| 23 | +`curl -s -X DELETE http://localhost:8080/topjava/rest/profile/meals/100002 --user user@yandex.ru:password` |
24 | 24 |
|
25 | 25 | #### create Meals |
26 | | -`curl -s -X POST -d '{"dateTime":"2020-02-01T12:00","description":"Created lunch","calories":300}' -H 'Content-Type:application/json;charset=UTF-8' http://localhost:8080/topjava/rest/profile/meals` |
| 26 | +`curl -s -X POST -d '{"dateTime":"2020-02-01T12:00","description":"Created lunch","calories":300}' -H 'Content-Type:application/json;charset=UTF-8' http://localhost:8080/topjava/rest/profile/meals --user user@yandex.ru:password` |
27 | 27 |
|
28 | 28 | #### update Meals |
29 | | -`curl -s -X PUT -d '{"dateTime":"2020-01-30T07:00", "description":"Updated breakfast", "calories":200}' -H 'Content-Type: application/json' http://localhost:8080/topjava/rest/profile/meals/100003` |
| 29 | +`curl -s -X PUT -d '{"dateTime":"2020-01-30T07:00", "description":"Updated breakfast", "calories":200}' -H 'Content-Type: application/json' http://localhost:8080/topjava/rest/profile/meals/100003 --user user@yandex.ru:password` |
0 commit comments