Merge pull request #3147 from louisquach/patch-1

Update serviceinvocation-quickstart.md
This commit is contained in:
Hannah Hunter 2023-02-15 11:23:28 -06:00 committed by GitHub
commit 590e36336b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View File

@ -304,11 +304,13 @@ Run the `order-processor` service alongside a Dapr sidecar.
dapr run --app-port 7001 --app-id order-processor --app-protocol http --dapr-http-port 3501 -- dotnet run
```
Below is the working code block from the order processor's `Program.cs` file.
```csharp
app.MapPost("/orders", async context => {
var data = await context.Request.ReadFromJsonAsync<Order>();
Console.WriteLine("Order received : " + data);
await context.Response.WriteAsync(data.ToString());
app.MapPost("/orders", (Order order) =>
{
Console.WriteLine("Order received : " + order);
return order.ToString();
});
```
@ -334,7 +336,7 @@ Run the `checkout` service alongside a Dapr sidecar.
dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 -- dotnet run
```
In the `checkout` service, you'll notice there's no need to rewrite your app code to use Dapr's service invocation. You can enable service invocation by simply adding the `dapr-app-id` header, which specifies the ID of the target service.
In the Program.cs file for the `checkout` service, you'll notice there's no need to rewrite your app code to use Dapr's service invocation. You can enable service invocation by simply adding the `dapr-app-id` header, which specifies the ID of the target service.
```csharp
var client = new HttpClient();

View File

@ -447,7 +447,7 @@ Tell the Sentry service where to load the certificates from using the `--issuer-
The next examples creates root and issuer certs and loads them with the Sentry service.
*Note: This example uses the step tool to create the certificates. You can install step tool from [here](https://smallstep.com/docs/getting-started/). Windows binaries available [here](https://github.com/smallstep/cli/releases)*
*Note: This example uses the step tool to create the certificates. You can install step tool from [here](https://smallstep.com/docs/step-cli/installation). Windows binaries available [here](https://github.com/smallstep/cli/releases)*
Create the root certificate: