【发布时间】:2021-06-15 18:31:32
【问题描述】:
尝试使用 swagger 测试我的 api 时出现 405 错误。我的 api 接受以下格式的数据。
[HttpPost("AddEmployee")]
public IActionResult AddEmployee(EmployeeDto employee, IFormFile file )
{
}
得到响应
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.13",
"title": "Unsupported Media Type",
"status": 415,
"traceId": "00-19508b3749296a4bb84e43b5d21dc6c7-cabb1ff5b2609a43-00"
}
【问题讨论】:
标签: c# .net-core asp.net-core-webapi