We will add a new document to the Orders
database by creating a PUT
request using the RESTClient tool. The new document will have the ID = Orders/C676332
and will be added to the Orders
collections which belongs to the Orders
database.
Once the document is added to the server, we will take a look at the server response. Then, we will open the Management Studio and verify that the document has been correctly added to the server:
Launch the RESTClient tool.
Click on the Method tab and select the PUT HTTP method.
In the HTTP Request section, enter this URL:
http://localhost:8080/databases/orders/docs/Orders/C676332
.Click on the Body tab and select String body from the drop-down list and enter the following JSON snippet:
{ "CustomerId": "A55689", "Item": "Mouse Pad", "OrderDate": "11/3/2011", "UnitCost": 8.5, "Units": 10 }
Click on the Header tab and enter
Raven-Entity-Name
in the Key textbox andOrders
in the Value textbox and then click on the...