Aspire service discovery support #1940
Closed
petermorlion
started this conversation in
General
Replies: 1 comment 1 reply
-
Normally this should work as expected and at least for me it works
Resolving the service url from its name is done by the HttpClient you get from IHttpClientFactory. At least today (idk if it already were done like this when you tried) Refit uses internally a client provided by this factory so this should work as expected. If this probleme still exist could you please provide the steps to reproduce this issue? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For a course on architecture, I want to use Refit to showcase N-tier architectures. But I can't seem to get Refit to work with Aspire service discovery. Basically, what I have is this what I have in my Aspire AppHost:
In my Presentation tier, the Program.cs has this:
(where
IBusinessLayerApi
is the interface where I put Refit's attributes on)From the official docs I assumed that something 🪄magical🪄 was going to happen and that the URL would be replaced with the correct one (https://localhost:7195 in my case), but that doesn't seem to happen?
What's the correct way to integrate Refit with Aspire?
Beta Was this translation helpful? Give feedback.
All reactions