When to return IHttpActionResult vs Object

后端 未结 2 1546
故里飘歌
故里飘歌 2020-12-28 14:29

In examples of using the ASP.NET Web API I see two different methods used to return data to the calling jQuery function. The first method returns an object of type Cli

2条回答
  •  忘掉有多难
    2020-12-28 15:02

    The second method allows you to return just status codes (like the 404 in the example), streaming file content and other types of non-object content.

提交回复
热议问题