Skip to content

chore: rewrite invoke/http example to use native HttpClient#1742

Draft
javier-aliaga wants to merge 1 commit into
dapr:masterfrom
javier-aliaga:chore/invoke-http-example-native-client
Draft

chore: rewrite invoke/http example to use native HttpClient#1742
javier-aliaga wants to merge 1 commit into
dapr:masterfrom
javier-aliaga:chore/invoke-http-example-native-client

Conversation

@javier-aliaga
Copy link
Copy Markdown
Contributor

@javier-aliaga javier-aliaga commented May 12, 2026

The DaprClient.invokeMethod wrappers were deprecated by #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).

Description

Please explain the changes you've made

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: #[issue number]

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant