aspnetcore api에 게시 할 때 415 HTTP 오류 결과가 표시됩니다. 내 엔드 포인트는 [HttpPost] 대신으로 표시되는 경우 이 발생하지 않습니다 [HttpDelete]를 aspnetcore API를 컨트롤러에서
: 각 컨트롤러에
[HttpDelete]
public async Task<IActionResult> Delete([FromBody]EntityViewModel vm)
{
:
var obj = new Object();
obj.atr1 = 1;
obj.atr2 = 2 ;
$http.post(route, obj)
.then(function (response) {
EntityViewModel .cs
public class EntityViewModel
{
public int Atr1 { get; set; }
public int Atr2 { get; set; }
}
를 사용하는 제언 AngularJS와 부분에 대한
? –
@SterlingArcher가 EntityViewModel 클래스로 질문을 업데이트했습니다. –