【发布时间】:2020-10-24 12:33:33
【问题描述】:
"APIs": {
"API-1": "http://localhost:5000/student",
"API-2": "http://localhost:5001/teacher"}
我在 launchSettings.json 文件中创建了这些属性。现在我需要访问 Student.razor 页面中的 API-1 和 API-2 值。 我试着像这样使用它..
List<Student> students = await http.GetFromJsonAsync<List<Student>>("API-1");
【问题讨论】:
-
launchSettings.json 仅用于开发。 prod中没有launchSettings
标签: blazor blazor-client-side asp.net-blazor blazor-webassembly