Return Standard Inbuilt Response Codes from a 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 }