为什么我不能在这里回复一个糟糕的请求?在其他例子中,它工作得很好。
[HttpGet("getPrediction/{dateTime}/{filterUnit}/{filterLocation}/{filterContent}")]
public int GetFillLevelForDateTime(string dateTime, bool filterUnit, int unit, bool filterLocation,
double latitude, double longitude, bool filterContent, string containerContent)
{
try
{
bool tempExists = predictionService.CheckIfMessagesExist(unit, latitude, longitude, filterUnit, filterLocation);
if (tempExists)
{
return GetFillLevelPrediction(dateTime, filterUnit, unit, filterLocation, latitude, longitude, filterContent, containerContent);
}
} catch (Exception ex)
{
return BadRequest();
}
}
更改操作标题
public ActionResult<int> GetFillLevelForDateTime ....