mirror of https://github.com/dapr/docs.git
Improve service invocation docs (#210)
* Cross link service invocation #209 * fix service invoke urls #209
This commit is contained in:
parent
b4d0f67fc7
commit
568023a957
|
@ -24,6 +24,10 @@ This directory contains various Dapr concepts. The goal of these documents is to
|
|||
|
||||
Pub/Sub is a loosely coupled messaging pattern where senders (or publishers) publishes messages to a topic, to which subscribers subscribe. Dapr natively supports the pub/sub pattern.
|
||||
|
||||
* [**Service Invocation**](./service-invocation/service-invocation.md)
|
||||
|
||||
Service invocation enables applications to communicate with each other through well-known endpoints in the form of http or gRPC messages. Dapr provides an endpoint that acts as a combination of a reverse proxy with built-in service discovery, while leveraging built-in distributed tracing and error handling.
|
||||
|
||||
* [**Secrets**](./components/secrets.md)
|
||||
|
||||
In Dapr, a secret is any piece of private information that you want to guard against unwanted users. Dapr offers a simple secret API and integrates with secret stores such as Azure Key Vault and Kubernetes secret stores to store the secrets.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Service Invocation
|
||||
# Service Invocation
|
||||
|
||||
Dapr-enabled apps can communicate with each other through well-known endpoints in the form of http or gRPC messages.
|
||||
|
||||
|
@ -26,4 +26,4 @@ Steps 4-5 are the same as the list above.
|
|||
|
||||
For more information, see:
|
||||
- The [Service Invocation Spec](../../reference/api/service_invocation.md)
|
||||
- A [HowTo]() on Service Invocation
|
||||
- A [HowTo](../../howto/invoke-and-discover-services/README.md) on Service Invocation
|
|
@ -8,6 +8,8 @@ In many environments with multiple services that need to communicate with each o
|
|||
|
||||
Dapr allows developers to overcome these challenges by providing an endpoint that acts as a combination of a reverse proxy with built-in service discovery, while leveraging built-in distributed tracing and error handling.
|
||||
|
||||
For more info on service invocation, read the [conceptional documentation](../../concepts/service-invocation/service-invocation.md).
|
||||
|
||||
## 1. Choose an ID for your service
|
||||
|
||||
Dapr allows you to assign a global, unique ID for your app.<br>
|
||||
|
@ -71,7 +73,7 @@ This Python app exposes an `add()` method via the `/add` endpoint.
|
|||
### Invoke with curl
|
||||
|
||||
```
|
||||
curl http://localhost:3500/v1.0/invoke/cart/add -X POST
|
||||
curl http://localhost:3500/v1.0/invoke/cart/method/add -X POST
|
||||
```
|
||||
|
||||
Since the aoo endpoint is a 'POST' method, we used `-X POST` in the curl command.
|
||||
|
@ -79,13 +81,13 @@ Since the aoo endpoint is a 'POST' method, we used `-X POST` in the curl command
|
|||
To invoke a 'GET' endpoint:
|
||||
|
||||
```
|
||||
curl http://localhost:3500/v1.0/invoke/cart/add
|
||||
curl http://localhost:3500/v1.0/invoke/cart/method/add
|
||||
```
|
||||
|
||||
To invoke a 'DELETE' endpoint:
|
||||
|
||||
```
|
||||
curl http://localhost:3500/v1.0/invoke/cart/add -X DELETE
|
||||
curl http://localhost:3500/v1.0/invoke/cart/method/add -X DELETE
|
||||
```
|
||||
|
||||
Dapr puts any payload return by their called service in the HTTP response's body.
|
||||
|
|
Loading…
Reference in New Issue