You will open the document you just added to the Orders
database using the Management Studio in order to copy its ID. Then, you will patch this document using the PATCH
request. The patch request will add two new fields to the document: Colour
and Discount
. After that, you will view the modified document in the Management Studio:
Open the Management Studio and select the
Orders
database.Click on the Documents tab and open the document which has a
Guid
as ID.Copy the document ID to the clipboard.
Launch the RESTClient tool.
Click on the Method tab and select the PATCH HTTP method.
In the HTTP Request section, enter this URL and complete it by the document
Guid
you stored on the clipboard:http://localhost:8080/databases/orders/docs/{your Guid}
.Click on the Header tab and ensure that the
Raven-Entity-Name
metadata key is sent to the RavenDB server with the Value =Orders
.Click on the Body tab and select String Body in the drop-down list.
Enter the following...