在 .NET 5 中,我创建了一个默认的 webapi 解决方案“WebApplication1”,并且我有一个操作WeatherForecastController:
[HttpGet]
[Route("[action]")]
public (bool,string) Test()
{
return (true, "have a test!");
}
Run Code Online (Sandbox Code Playgroud)
为什么我总是得到一个空的 JSON {}?