devxlogo

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

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

?

devx-admin

Share the Post: