Tip: Return Standard Inbuilt Response Codes from an ASP.NET Core Controller

ASP.NET core has inbuilt methods to return few standard response codes. Here is an example.

[HttpGet] public IActionResult CustomStatusCode() {  //code return BadRequest; //sends status code 400 }


Visit the DevX Tip Bank


Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Related Posts