Common Class to check HttpStatusCode RRS feed

  • Question

  • User-1466065877 posted


    I would like to return some HttpStatusCode (e.g. OK, Created, Accepted, Unauthorize, Not Found, RequestTimeout and InternalServerError with msg) in Controller. Since I have multiple methods in controllers, I want to implement it in a common file (i.e. controller.cs) and inherits all controllers to this file.

    However, I'm not sure how to return HttpStatusCode correctly in WEBAPI. Is there any method to return it correctly?

    Tuesday, August 4, 2015 9:40 PM

All replies