question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Prefix the request Uri

See original GitHub issue

https://github.com/dapr/dotnet-sdk/blob/9104c6624cc474e52717ddb7408a75449b071a02/src/Dapr.Client/InvocationHandler.cs#L112

In the above method, it could be cool on creating the httpClient the UriBuilder’s path could have a prefix before right side of the assignment for the path. in our case I have configured a sidecard for CamundaPlatform and there is a camunda client library available for dotnet. To access CamundaPlatform you need to do this http://HOST_ADDRESS/engine-rest but now the sidecar doesn’t know about /engine-rest so the dapr-sdk sends the request like this http://DAPR_ENDPOINT/v1.0/invoke/APP_ID/method/messages for example and it should send it like this http://DAPR_ENDPOINT/v1.0/invoke/APP_ID/method/engine-rest/messages.

I would be happy to make a pull request and add this optional prefix while creating the InvokeHandler 😃

Regards, Farhad

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
fbridgercommented, Oct 20, 2021

@farhadnowzari right. Using engine-rest/message should work as you are providing the entire path that Dapr Sidecar will use to hit the app.

0reactions
farhadnowzaricommented, Oct 20, 2021

Hi @fbridger

Sry for the delay 🙂

I mean for the calls between the sidecars specifically for the method invocation. When the service calls it’s sidecar to invoke a method through the sidecar of another service.

But now I’m more experienced with dapr. I’m right now on a vacation without any notebooks. I will try to put the path on the method name as soon as I get back. I think it would work. So I will pass engine-rest/message instead of just message.

Read more comments on GitHub >

github_iconTop Results From Across the Web

URI prefixes - Win32 apps
A prefix alias is a shortcut that represents the long resource URI prefix. You can also use aliases in the Winrm command-line. To...
Read more >
Understand Default URL Pattern
Prefix URL : Denotes the path where the entry resides. For example, /SEO/blog; Entry-specific URL: Denotes the URL of the entry. For example,...
Read more >
uri (Caddyfile directive) — Caddy Documentation
Manipulates a request's URI. It can strip path prefix/suffix or replace substrings on the whole URI. This directive is distinct from rewrite in...
Read more >
Collection routing
For each API collection, the API gateway uses the routing prefix of the collection to form a complete URI as follows and accepts...
Read more >
how to solve this :The URI prefix is not recognized
1 Answer. From Your Error It seems that you are creating a web request with wrong url. Please make sure that in (HttpWebRequest)HttpWebRequest. ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found