I'm doing an api web service with c #. In a controller I need to have two post methods.
Right now, I have something like this.
public class TramitesController : ApiController
{
[ResponseType(typeof(Tramite))]
[BasicAuthenticationFilter]
public IHttpActionResult PostTramite(Tramite tramite)
{
return null;
}
[ResponseType(typeof(Incidencia))]
[BasicAuthenticationFilter]
public IHttpActionResult PostTramite(Incidencia incidencia)
{
return null;
}
}
If I mention one or the other method, it works correctly, but both at the same time, it does not, it gives an error.
Is it possible to have more than one post method?
Thanks