From d961544b8b4cecc9fd674095fd268dcf3b0e1cee Mon Sep 17 00:00:00 2001 From: jvelilla Date: Thu, 8 Dec 2011 18:48:50 -0300 Subject: [PATCH] Updated restbucksCRUD documentation --- examples/restbucksCRUD/readme.md | 52 +++++++++++++++++++++++++++++++ examples/restbucksCRUD/readme.txt | 51 ------------------------------ 2 files changed, 52 insertions(+), 51 deletions(-) create mode 100644 examples/restbucksCRUD/readme.md diff --git a/examples/restbucksCRUD/readme.md b/examples/restbucksCRUD/readme.md new file mode 100644 index 00000000..0d11adbe --- /dev/null +++ b/examples/restbucksCRUD/readme.md @@ -0,0 +1,52 @@ +Restbuck Eiffel Implementation based on the book of REST in Practice + +This is an implementation of CRUD web services as is presented in the book + +Verb URI or template Use +POST /order Create a new order, and upon success, receive a Locationheader specifying the new order’s URI. +GET /order/{orderId} Request the current state of the order specified by the URI. +PUT /order/{orderId} Update an order at the given URI with new information, providing the full representation. +DELETE /order/{orderId} Logically remove the order identified by the given URI. + + +How to Create an order + + * Uri: http://localhost:8080/order + * Method: POST + * Note: you will get in the response the "location" of the new your order. + * HEADERS: + + Content-Type: application/json + + * Example CONTENT + + { + "location":"takeAway", + "items":[ + { + "name":"Late", + "option":"skim", + "size":"Small", + "quantity":1 + } + ] + } + + + +How to Read an order + * Uri: http://localhost:8080/order/{order_id} + * Method: GET + + + + +How to Update an order + * Uri: http://localhost:8080/order/{order_id} + * Method: PUT + + +How to Delete an order + * Uri: http://localhost:8080/order/{order_id} + * Method: DELETE + diff --git a/examples/restbucksCRUD/readme.txt b/examples/restbucksCRUD/readme.txt index dfff1b30..e69de29b 100644 --- a/examples/restbucksCRUD/readme.txt +++ b/examples/restbucksCRUD/readme.txt @@ -1,51 +0,0 @@ -Restbuck Eiffel Implementation based on the book of REST in Practice - - -Verb URI or template Use -POST /order Create a new order, and upon success, receive a Locationheader specifying the new order’s URI. -GET /order/{orderId} Request the current state of the order specified by the URI. -PUT /order/{orderId} Update an order at the given URI with new information, providing the full representation. -DELETE /order/{orderId} Logically remove the order identified by the given URI. - - -How to Create an order - - * Uri: http://localhost:8080/order - * Method: POST - * Note: you will get in the response the "location" of the new your order. - * HEADERS: - - Content-Type: application/json - - * Example CONTENT - - { - "location":"takeAway", - "items":[ - { - "name":"Late", - "option":"skim", - "size":"Small", - "quantity":1 - } - ] - } - - - -How to Read an order - * Uri: http://localhost:8080/order/{order_id} - * Method: GET - - - - -How to Update an order - * Uri: http://localhost:8080/order/{order_id} - * Method: PUT - - -How to Delete an order - * Uri: http://localhost:8080/order/{order_id} - * Method: DELETE -