I've got a very simple WebAPI controller (all system defaults) and when I do a post to it, the fact that it has Content-Type: application/json makes the post (from fiddler) hang (not return).
My headers are as follows:
Content-Length: 2
Content-Type: application/json
and the post body is simply
[]
My WebAPI controller just looks like this:
namespace WebAPI.rest
{
public class SendGridController : ApiController
{
public HttpResponseMessage Post()
{
try
{
HttpContent requestContent = Request.Content;
string json = requestContent.ReadAsStringAsync().Result.Trim();
}
catch (Exception ex)
{
throw ex;
}
return new HttpResponseMessage(HttpStatusCode.OK);
}
When I make the same post (with fiddler) to http://respondto.it/ it returns no problem