printAllMenuItems (GET) - adapalav/dev-ent-java-microserv-spring-final-proj-template GitHub Wiki

curl http://localhost:8080/printAllMenuItems

Show All Menu Items in Restaurant Database

/printAllMenuItems - Print all menu items

Method: GET

URL / Path: /printAllMenuItems /spring-proj-template/printAllMenuItems

URL Params

Required: None

Optional: None

Data Params Headers: None

Success Response:

GET command success response: http://localhost:8080/printAllMenuItems

SELECT * from menu_list;

1, Aloo Palak, Lunch, Rice served on side; spinach and potatoes with spices, 7.99 2, Coffee, Drink, Fresh brewed coffee, 1.29 3, Halwa, Dessert, Desert made of floor, jaggery and sugar, 3.49 4, Veg Biryani, Lunch, Rice with veg and spices, 10.99 5, Gulab Jamun, Desert, Desert made of floor and sugar, 2.99 6, Lassi, Drink, Juice made of yogurt, water and sugar, 2.99 7, Chicken Manchuria, Apitizer, Chicken with onions and spices, 8.99 8, Ras Malai, Desert, Desert made of floor, condensed milk and sugar, 3.99 11, Pakoda, Apitizer, Apitizer made of floor, 5.99

Failure Responses:

Connection Failure(One of the scenarios could be when Jetty not running): curl: (7) Failed to connect to ec2-52-88-192-213.us-west-2.compute.amazonaws.com port 8080: Connection refused

No response because of command specific error: (base) admins-MBP-2:~ vijayadapala$ curl http://localhost:8080/spring-proj-template/printAllCustomers {"timestamp":"2020-08-21T23:25:52.409+0000","status":404,"error":"Not Found","message":"No message available","path":"/spring-proj-template/printAllCustomers"}

Error With Incorrect Arguments: This application has no explicit mapping for /error, so you are seeing this as a fallback. Fri Aug 21 16:44:04 PDT 2020 There was an unexpected error (type=Method Not Allowed, status=405). Request method 'GET' not supported

Error sending all keys/values as params: {"timestamp":"2020-08-22T04:17:35.497+0000","status":404,"error":"Not Found","message":"No message available","path":"/"}

Code: 200 Content: { id : 12 } Error Response:

<Most endpoints will have many ways they can fail. From unauthorized access, to wrongful parameters etc. All of those should be listed here. It might seem repetitive, but it helps prevent assumptions from being made where they should be.>

Code: 401 UNAUTHORIZED Content: { error : "Log in" } OR

Code: 422 UNPROCESSABLE ENTRY Content: { error : "Email Invalid" }

Sample Call: curl http://localhost:8080/printAllCustomers

Notes: MySQL Query: SELECT * from menu_list;

21st August 2020