Skip to content

Commit 3e3cb40

Browse files
committed
Updated readme with powershelll commands
1 parent a17c227 commit 3e3cb40

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

examples/Actor/README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The Actor example shows how to create a virtual actor (`DemoActor`) and invoke i
2222
To run the actor service locally run this command in `DemoActor` directory:
2323

2424
```sh
25-
dapr run --dapr-http-port 3500 --app-id demo_actor --app-port 5010 dotnet run
25+
dapr run --dapr-http-port 3500 --app-id demo_actor --app-port 5010 --config ./previewConfig.yaml dotnet run
2626
```
2727

2828
The `DemoActor` service will listen on port `5010` for HTTP.
@@ -54,15 +54,14 @@ Following curl call will save data for actor id "abc"
5454

5555
On Linux, MacOS:
5656

57-
```sh
57+
``` bash
5858
curl -X POST http://127.0.0.1:3500/v1.0/actors/DemoActor/abc/method/SaveData -d '{ "PropertyA": "ValueA", "PropertyB": "ValueB" }'
5959
```
6060

6161
On Windows:
6262

63-
```sh
64-
curl -X POST http://127.0.0.1:3500/v1.0/actors/DemoActor/abc/method/SaveData -d "{ \"PropertyA\": \"ValueA\", \"PropertyB\": \"ValueB\" }"
65-
63+
``` powershell
64+
Invoke-WebRequest -Method POST -Uri http://127.0.0.1:3500/v1.0/actors/DemoActor/abc/method/SaveData -ContentType "application/json" -Body '{ "data": {"PropertyA": "ValueA", "PropertyB": "ValueB" }, "ttl": "00:10:00" }'
6665
```
6766

6867
**Get Data**
@@ -71,12 +70,12 @@ Following curl call will get data for actor id "abc"
7170

7271
On Linux, MacOS:
7372

74-
```sh
73+
``` bash
7574
curl -X POST http://127.0.0.1:3500/v1.0/actors/DemoActor/abc/method/GetData
7675
```
7776

7877
On Windows:
7978

80-
```sh
81-
curl -X POST http://127.0.0.1:3500/v1.0/actors/DemoActor/abc/method/GetData
79+
``` powershell
80+
Invoke-WebRequest -Method POST -Uri http://127.0.0.1:3500/v1.0/actors/DemoActor/abc/method/GetData
8281
```

0 commit comments

Comments
 (0)