simple spark web application
you can access to api at the heroku. Api base url is heroku
model object is the product.
private int id;
private String name;
private List<String> categories = new LinkedList<String>();
private double price;
private boolean available;
- /post for the create new product
- /get/:id for the get existing product
- /get for the get all existing products
- /put for the update existing product
- /delete/:id for the delete existin product
-
new product please use the http post method with below sample body;
{ "id" : "1", "name":"ZTE AXON 7", "categories": [ "PHONE", "ZTE" ], "price":"2499", "available":"true" }
-
get product(s) please use the get method with sample url's
- https://caysever-spark.herokuapp.com/api/products
- https://caysever-spark.herokuapp.com/api/products/1
- delete product please use the http delete method with sample url
- update product
please use the http put method with below sample body;
{ "id" : "1", "name":"ZTE AXON 7", "categories": [ "PHONE", "ZTE" ], "price":"2499", "available":"true" }
Products will be stored in memory.