diff --git a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-discover-services.md b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-discover-services.md index 23a450559..4651ee815 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-discover-services.md +++ b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-discover-services.md @@ -112,7 +112,10 @@ curl http://localhost:3500/v1.0/invoke/cart/method/add -X DELETE Dapr puts any payload returned by the called service in the HTTP response's body. -Furthermore, in order to avoid changing URL paths as much as possible, when make Dapr calls from user's code, Dapr provides a new way to help to integrate Dapr more easily: +### Additional URL formats + +In order to avoid changing URL paths as much as possible, Dapr provides the following ways to call the Service Invocation API: + 1. Change the address in the URL to `localhost:`. 2. Add a `dapr-app-id` header to specify the ID of the target service, or alternatively pass the ID via HTTP Basic Auth: `http://dapr-app-id:@localhost:3500/path`. @@ -122,12 +125,14 @@ For example, the following command curl http://localhost:3500/v1.0/invoke/cart/method/add ``` -is equivalent with +is equivalent to: + ```bash curl -H 'dapr-app-id: cart' 'http://localhost:3500/add' -X POST ``` -or +or: + ```bash curl 'http://dapr-app-id:cart@localhost:3500/add' -X POST ```