lundi 23 septembre 2019

I want to change the parameter that got in the http post action and I get an error: method not allowed

I want to change the parameter in the http post method in the controller in web api c# and I get the error:method not allowed.

I tried to add [HttpPost, Route("api/TDayInYears")] and I got the error:method not found.

my code was: [ResponseType(typeof(TDayInYear))] public IHttpActionResult PostTDayInYear(TDayInYear tDayInYear) {...} and I changed it to: [ResponseType(typeof(DateTime))] public IHttpActionResult PostTDayInYear(DateTime d) {...}




Aucun commentaire:

Enregistrer un commentaire