我已经将Flurl设置为在我的Xamarin PCL中运行,并且我正在调用一个在MVC应用程序中运行的Web Api。似乎Flurl可以毫不费力地访问我部署的API,但由于某些原因,我无法在本地测试更改。这就是我要做的:
var data = await "http://localhost:60257/api/gigapi".GetJson
因此,我有一个在Visual Studio 2019中运行的API,我可以通过在浏览器中键入url来发出请求,例如但是当我试图从代码中进行这样的调用时application/json"));
var responseMessage = await httpClient.GetAsync(@"https://192.168.1.19