From 6eb2b0bdc937a9d19b5d0232e07cd04bf39004ce Mon Sep 17 00:00:00 2001 From: Esteban Luchsinger Date: Sun, 25 Apr 2021 12:44:13 +0200 Subject: [PATCH 1/2] Fix typo Add a missing word --- daprdocs/content/en/getting-started/get-started-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/getting-started/get-started-api.md b/daprdocs/content/en/getting-started/get-started-api.md index 1e684538d..5967d32bf 100644 --- a/daprdocs/content/en/getting-started/get-started-api.md +++ b/daprdocs/content/en/getting-started/get-started-api.md @@ -11,7 +11,7 @@ You will now run the sidecar and call the API directly (simulating what an appli ## Step 1: Run the Dapr sidecar -One the most useful Dapr CLI commands is [`dapr run`]({{< ref dapr-run.md >}}). This command launches an application together with a sidecar. For the purpose of this tutorial you'll run the sidecar without an application. +One of the most useful Dapr CLI commands is [`dapr run`]({{< ref dapr-run.md >}}). This command launches an application together with a sidecar. For the purpose of this tutorial you'll run the sidecar without an application. Run the following command to launch a Dapr sidecar that will listen on port 3500 for a blank application named myapp: From 2205991dc2bd551241f494c71cbbf101b57ea557 Mon Sep 17 00:00:00 2001 From: Esteban Luchsinger Date: Sun, 25 Apr 2021 12:57:34 +0200 Subject: [PATCH 2/2] Clarify state management examples --- .../en/getting-started/get-started-api.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/daprdocs/content/en/getting-started/get-started-api.md b/daprdocs/content/en/getting-started/get-started-api.md index 5967d32bf..f26919738 100644 --- a/daprdocs/content/en/getting-started/get-started-api.md +++ b/daprdocs/content/en/getting-started/get-started-api.md @@ -23,7 +23,20 @@ With this command, no custom component folder was defined, so Dapr uses the defa ## Step 2: Save state -In a separate terminal run: +We will now update the state with an object. The new state will look like this: + +```json +[ + { + "key": "name", + "value": "Bruce Wayne" + } +] +``` + +Notice, the object contained in the state has a `key` assigned with the value `name`. You will use the key in the next step. + +Run the command shown below to store the new state. {{< tabs "HTTP API (Bash)" "HTTP API (PowerShell)">}} {{% codetab %}} @@ -44,7 +57,7 @@ Invoke-RestMethod -Method Post -ContentType 'application/json' -Body '[{ "key": ## Step 3: Get state -Now get the state you just stored using a key with the state management API: +Now get the object you just stored in the state by using the state management API with the key `name`: {{< tabs "HTTP API (Bash)" "HTTP API (PowerShell)">}}