dotnet-sdk/samples/AspNetCore
Ryan Nowak 9748ca0a82
Simplify service invocation APIs (#555)
Fixes: #549

This change mixes up the service invocation APIs to reflect some changes
that are coming down the pipe in dapr/dapr#2683.

We're now using HTTP's semantics and JSON for the main functionality in
`InvokeMethodAsync`. This means that the error handling is simplified
and base on HTTP's status codes rather than trying to abstract over HTTP
and gRPC's different error models. This also means that we're free to
expose HttpRequestMessage and related types in the API because it's no
longer an abstraction.

You can still use `InvokeMethodAsync` to invoke gRPC services, but you
will get a status code in the response, and it will expect JSON, etc,
similar to how gRPC gateway works.

In addition to that we're added `InvokeMethodGrpcAsync` for cases where
you really want *gRPC's* semantics. These methods do Protobuf
serialization, as is a natural choice for gRPC. I do not recommend using
this approach to invoke HTTP services.

---

I also mad updates and improvments to various infrastructure where
necessary (like InvocationException). Also, the gRPC sample in the repo
now uses the new `InvokeMethodGrpcAsync` APIs.
2021-01-22 16:28:20 -08:00
..
ControllerSample Merge release-1.0.0 into master (#518) 2020-12-18 11:12:39 -08:00
GrpcServiceSample Simplify service invocation APIs (#555) 2021-01-22 16:28:20 -08:00
RoutingSample Merge release-1.0.0 into master (#518) 2020-12-18 11:12:39 -08:00
SecretStoreConfigurationProviderSample DaprClient: Implementing GetBulkSecretAsync (#511) 2021-01-21 15:35:24 -08:00