- JDK Server
- Grizzly Server
mvn install
mvn test
mvn clean compile exec:java
See the curl scripts below with the REST API supported operations:
curl -X GET \
'http://localhost:8080/rest/dishes' \
-H 'Accept: text/plain'
curl -X GET \
'http://localhost:8080/rest/dishes/1' \
-H 'Accept: application/json'
curl --header "Content-Type: application/json"
--request POST --data '{"id":"101","name":"Veggie"}'
http://localhost:8080/rest/menus -i'
curl --header "Content-Type: application/json"
--request PUT --data '{"id":"1","name":"Veggie u1"}'
http://localhost:8080/rest/menus/1 -i
curl --header "Content-Type: application/json"
--request PATCH
http://localhost:8080/rest/menus/1?name=menuitem2 -i
curl --header "Content-Type: application/json" --request DELETE http://localhost:8080/rest/menus/1 -id
Alternatively to curl, you can use Postman to target the REST API.