ASP.NET의 웹 API와 함께 IList의
Exception:Thrown: "No MediaTypeFormatter is available to read an object of type 'List`1' from content with media type 'text/html'." (System.Net.Http.UnsupportedMediaTypeException)
0 :
나는 오류를 얻을 123,414,편집 :
이 도움이하지만 IIS 로그 파일에서이 얻을 경우 나도 몰라 :
이2014-03-31 16:11:31 127.0.0.1 GET /api/ikeyword/getkeywordidsfromids/System.Collections.Generic.List`1[System.Int32] - 80 - 127.0.0.1 - 404 0 2 1
EDIT2 :
기본 경로 :
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{action}/{id}",
defaults: new { id = RouteParameter.Optional }
);
코드에 매개 변수를 추가하는 방법을 참조하십시오. http://stackoverflow.com/questions/217070/how-do-i-add-query -parameters-to-a-getmethod-using-java-commons-httpclient –
안녕하세요. IList에 대한 예제가 없습니다. –
Patrick
여기서'List ids'을 넣으시겠습니까? 당신은 몸이나 uri에 그것을두고? –