.net return manual status code

104

.net return manual status code -

return StatusCode(418);

.net return manual status code -

return this.StatusCode(StatusCodes.Status418ImATeapot, "Error message");

.net return manual status code -

// 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();
}

Comments

Submit
0 Comments