Contents tagged with WebAPI

  • Correctly Posting String Data To A WebAPI Controller

    Seems like a pretty simple scenario, right? So I got to work and wrote the following: [HttpPost] [Route("api/users/me/delete")] public HttpResponseMessage CoolMethod(string myData) { } However, when attempting to actually call into the controller, all I was getting back was 404/not found errors. Seems strange, right? The following worked without issue, though: [HttpPost] [Route("api/users/me/ … more

  • 1