I have apiController like below. And, I'm sending delete
request by Postman. But, my delete request not access to method. But, get
method working perfectly. What can be the reason of this bug?
My postman Url is: http://localhost:5004/api/Student/DeleteStudent/23
[ApiController]
[Route("api/[controller]/[action]")]
public class StudentController : ControllerBase
{
[HttpDelete("DeleteStudent/{studentId}")]
public async Task<ServiceResult> DeleteStudent(long studentId)
{
return await studentService.DeleteStudent(studentId);
}
[HttpGet]
public async Task<ServiceResult> GetStudents(int studentType)
{
return await studentService.GetStudents(studentType);
}
}