java-sdk
java-sdk copied to clipboard
Add HTTP Client Factory into Java SDK
As we do in Dotnet today, it would be nice to give users the option to create an HTTP Client via the Java SDK through a factory. This would remove the current encapsulation around the existing invokeMethod and allow users additional options for HTTP Client without having to have all the method overloads.
For example in Dotnet:
var httpClient = DaprClient.CreateInvokeHttpClient();
var response = await httpClient.PostAsJsonAsync("http://order-processor/orders", order);
In the past we simplified this and now there is only HTTP for methodInvoke() and waitForSidecar(), but would be nice to standardize the SDKs: https://github.com/dapr/java-sdk/pull/1051