January 2018
Intermediate to advanced
336 pages
7h 56m
English
To test the routes of the Order service, create one or more orders by the same consumer ID and try to query all the orders for the same consumer ID. For simplicity, the routes assume the value of the token specified in the header as the consumer ID for the GET /orders route. Here is a list of cURL requests to demonstrate the process of creating, querying, and deleting the orders:
;; Add an order for Consumer with ID 1% curl -i -H "token: 1" -XPUT -d "service=1&provider=1&consumer=1&cost=500&status=O" http://localhost:8080/orders/1HTTP/1.1 200 OK...{"order/id":"1","order/service":"1","order/provider":"1","order/consumer":"1","order/cost":500.0,"order/status":"O"};; Add another order for Consumer with ID 1% curl -i -H "token: ...Read now
Unlock full access