Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Where can I find BaseAPIUrl for HttpClient()?

$
0
0

My MVC app needs to call a Web API in the same solution. Since they would have the same base URL I would assume I could get that from some environment variable. Right now I've got it in a config file, but that means I have to manually update it before publishing to Azure (which I forget), and it will potentially create issues if I change the domain name.

Can I find the equivalent of "BaseAPIUrl": "https://localhost:44380/" somewhere else, like in IConfiguration or IHostingEnvironment that I can then inject into functions?

TIA!

Dennis


Viewing all articles
Browse latest Browse all 9386

Trending Articles