Dapr provides users with the ability to call other applications that have unique ids. This functionality allows apps to interact with one another via named identifiers and puts the burden of service discovery on the Dapr runtime.
This endpoint lets you invoke a method in another Dapr enabled app.
POST/GET/PUT/DELETE http://localhost:<daprPort>/v1.0/invoke/<appId>/method/<method-name>
| Code | Description |
|---|---|
| 200 | Request successful |
| 500 | Request failed |
| Parameter | Description |
|---|---|
| daprPort | the Dapr port |
| appId | the App ID associated with the remote app |
| method-name | the name of the method or url to invoke on the remote app |
curl http://localhost:3500/v1.0/invoke/countService/method/sum \
-H "Content-Type: application/json"You can send data by posting it as part of the request body.
curl http://localhost:3500/v1.0/invoke/countService/method/calculate \
-H "Content-Type: application/json"
-d '{ "arg1": 10, "arg2": 23, "operator": "+" }'The response from the remote endpoint will be returned in the request body.