Skip to content

feat: add HTTP invocation example#310

Open
Vijay-K-2003 wants to merge 1 commit intodapr:mainfrom
Vijay-K-2003:issue243
Open

feat: add HTTP invocation example#310
Vijay-K-2003 wants to merge 1 commit intodapr:mainfrom
Vijay-K-2003:issue243

Conversation

@Vijay-K-2003
Copy link
Copy Markdown

Description

This PR adds a new example demonstrating how to invoke an HTTP service using Dapr's HTTP proxying capabilities within the Rust SDK ecosystem.

Specifically, it includes:

  • invoke-http-client: Uses reqwest to dispatch a request to the local Dapr sidecar port (DAPR_HTTP_PORT), setting the dapr-app-id header to seamlessly route the request via Dapr.
  • invoke-http-server: Implements a minimal Tokio TCP server acting as the invocation target mapping to 127.0.0.1:8080, removing the need for external HTTP server frameworks.
  • Dapr configuration: Added dapr.yaml to according to other examples allowing the entire example to be tested easily with a single dapr run -f . command.
  • Updated examples/Cargo.toml and authored a local README.md to guide users on how to run the example.

Issue reference

This PR will close #243

Checklist

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

@Vijay-K-2003 Vijay-K-2003 requested review from a team as code owners April 13, 2026 23:05
Signed-off-by: Vijay Karanjkar <vijaykaranjkar2003@gmail.com>
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.

How to invoke a HTTP service

1 participant