Web Server2(Spring REST)
Last updated
Was this helpful?
Last updated
Was this helpful?
HTTP VERB
URL
DESCRIPTION
GET
/order
Obtains the list of all orders currently created in the system. If the list is successfully obtained, the list of existing orders is returned, along with an HTTP200
(OK) status.
POST
/order
Creates a new order. This request should carry a request body that includes the data that should be associated with the newly created order. If the order is created, an HTTP201
(Created) status is returned along with the newly created order in the response body.
GET
/order/{id}
Obtains the order associated with the given ID. If no order exists, an HTTP404
(Not Found) status is returned. If the order can be found, an HTTP200
status is returned and the response body contains the information associated with the order.
PUT
/order/{id}
Updates an existing order. If no order with the given ID can be found, an HTTP404
status is returned. If an order exists with the given ID and the request body contains valid updates to the order, the order is updated and the updated order is returned in the response body, along with an HTTP200
status.
DELETE
/order/{id}
Deletes an order with the given ID. If no order exists, an HTTP404
status is returned. If the order exists, it is deleted, and an HTTP204
(No Content) status is returned.
Spring HATEOAS provides some APIs to ease creating REST representations that follow the HATEOAS principle when working with Spring and especially Spring MVC. The core problem it tries to address is link creation and representation assembly.
Model classes for link, resource representation models
Link builder API to create links pointing to Spring MVC controller methods
Support for hypermedia formats like HAL