Skip to content

Commit

Permalink
Service invocation supports passing of query strings/fragments in URL (
Browse files Browse the repository at this point in the history
…dapr#4217)

* Clarified that a query string or fragment can be appended to a service invocation request and it'll work without issue

Signed-off-by: Whit Waldo <[email protected]>

* Update daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-discover-services.md

Co-authored-by: Hannah Hunter <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>

* Update daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-discover-services.md

Signed-off-by: Mark Fussell <[email protected]>

---------

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Mark Fussell <[email protected]>
Co-authored-by: Hannah Hunter <[email protected]>
Co-authored-by: Mark Fussell <[email protected]>
  • Loading branch information
3 people authored and filintod committed Jun 26, 2024
1 parent c5ff8a7 commit 4da666b
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,14 @@ Using CLI:
dapr invoke --app-id checkout --method checkout/100
```

#### Including a query string in the URL

You can also append a query string or a fragment to the end of the URL and Dapr will pass it through unchanged. This means that if you need to pass some additional arguments in your service invocation that aren't part of a payload or the path, you can do so by appending a `?` to the end of the URL, followed by the key/value pairs separated by `=` signs and delimited by `&`. For example:

```bash
curl 'http://dapr-app-id:checkout@localhost:3602/checkout/100?basket=1234&key=abc` -X POST
```
### Namespaces
When running on [namespace supported platforms]({{< ref "service_invocation_api.md#namespace-supported-platforms" >}}), you include the namespace of the target app in the app ID. For example, following the `<app>.<namespace>` format, use `checkout.production`.
Expand Down

0 comments on commit 4da666b

Please sign in to comment.