Question : .net return manual status code
Answered by : leonard
return StatusCode(418);
Source : https://stackoverflow.com/questions/37690114/how-to-return-a-specific-status-code-and-no-contents-from-controller | Last Update : Wed, 10 Nov 21
Question : .net return manual status code
Answered by : leonard
return this.StatusCode(StatusCodes.Status418ImATeapot, "Error message");
Source : https://stackoverflow.com/questions/37690114/how-to-return-a-specific-status-code-and-no-contents-from-controller | Last Update : Wed, 10 Nov 21
Question : .net return manual status code
Answered by : leonard
// GET: api/Default/
public IHttpActionResult Get()
{ //return Ok();//200 //return StatusCode(HttpStatusCode.Accepted);//202 //return BadRequest();//400 //return InternalServerError();//500 //return Unauthorized();//401 return Ok();
}
Source : https://stackoverflow.com/questions/37690114/how-to-return-a-specific-status-code-and-no-contents-from-controller | Last Update : Wed, 10 Nov 21