I am using asp.net web api and I want to send proper status code along with the response. Currently it always returns 200 OK status.
I would like to send different response status like
on POST 201 Record Created
on PUT 205 Record Modified
on PUT 412 Validation Failed
on DELETE 204 Record Deleted etc.
These are quite standard status codes I found and all actions in web api accepts these request types.
I am currently struggling to find a clear example of how, in one place (most probably via action filter or http module) I can add that status code.
Kind Regards,
Jay