News

You can use the HttpResponseException class to return specific HTTP status codes and messages from your controller methods in Web API. Here is an example. public Employee GetEmployee(int id ...
void: in this case, your Web API would return an empty Http response with a status code of 204. Other types: in this case, your Web API would take advantage of the appropriate media formatter to ...