Quantcast
Channel: Web API
Viewing all articles
Browse latest Browse all 4850

Common Class to check HttpStatusCode

$
0
0

All,

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?


Viewing all articles
Browse latest Browse all 4850

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>