feat: add DaprClient.invokeHttpClient(appId) factory#1742
Draft
javier-aliaga wants to merge 3 commits into
Draft
feat: add DaprClient.invokeHttpClient(appId) factory#1742javier-aliaga wants to merge 3 commits into
javier-aliaga wants to merge 3 commits into
Conversation
The DaprClient.invokeMethod wrappers were deprecated by dapr#1666. Rewrite the invoke/http sample to use java.net.http.HttpClient through the Dapr sidecar, demonstrating both URL forms accepted by the sidecar — the dapr-app-id header against the sidecar base URL, and the explicit /v1.0/invoke/<app-id>/method/<method> path. Update the matching README snippet and reduce expected_stdout_lines to 'Done' — the previous expected lines never matched what DemoService returns (a timestamp). Signed-off-by: Javier Aliaga <javier@diagrid.io>
40be05a to
ec97be3
Compare
1c0578e to
e19e6ef
Compare
Provides an SDK-native successor to the invokeMethod APIs deprecated by dapr#1666. DaprClient.invokeHttpClient(appId) returns a DaprInvokeHttpClient pre-bound to {daprHttpEndpoint}/v1.0/invoke/{appId}/method/ that reuses the SDK's shared java.net.http.HttpClient and attaches the dapr-api-token header when configured. Update the invoke/http example and README to demonstrate the new helper alongside the raw dapr-app-id header form. Signed-off-by: Javier Aliaga <javier@diagrid.io>
e19e6ef to
297a3a3
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1742 +/- ##
============================================
+ Coverage 76.76% 76.86% +0.09%
- Complexity 2260 2279 +19
============================================
Files 241 242 +1
Lines 7066 7096 +30
Branches 740 742 +2
============================================
+ Hits 5424 5454 +30
Misses 1279 1279
Partials 363 363 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
DaprClient.invokeHttpClient(appId)as the SDK-native successor to theinvokeMethodoverloads deprecated by chore: Deprecate invoke methods #1666. Returns aDaprInvokeHttpClientpre-bound to{daprHttpEndpoint}/v1.0/invoke/{appId}/method/, reusing the SDK's sharedjava.net.http.HttpClientand attaching thedapr-api-tokenheader when configured.dapr-app-idheader form, replacing the deprecatedinvokeMethodusage.Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #1743
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: