This method is idempotent according to the http spec which means it should be of type GET
[Route("GetLoadProfile")]
[ResponseType(typeof(List<ufnGetCustomLoadProfile_Result>))]
public async Task<List<ufnGetCustomLoadProfile_Result>> LoadProfile(int accountId, DateTime startTime, DateTime endTime)
{
List<ufnGetCustomLoadProfile_Result> result = await db.ufnGetCustomLoadProfile(accountId, startTime, endTime).ToListAsync();
if (result == null)
return null;
return result;
}
I do not specify that it should be POST
and yet ASP.NET WEB.API 2 generates a POST
method.
Why does this happen?