매우 간단한 WebAPI 컨트롤러 (모든 시스템 기본값)가 있는데 게시 할 때 Content-Type : application/json이라는 사실이 있습니다. (피들러에서) 게시물을 중단 (돌아 오지 않음)시킵니다. 다음과 같이 Application/json 헤더가있는 WebAPI Post를 호출 할 때 응답 없음
내 헤더
은 다음과 같습니다Content-Length: 2
Content-Type: application/json
및 게시물의 몸은 단순히
[]
내 WebAPI 컨트롤러는 바로 다음과 같습니다
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);
}
나도 같은 걸 때 게시물 (피들러 포함)을 http://respondto.it/으로 보내면 문제가 없습니다.