suitable http status code to respond with in case you want to "warn" user?
In my app there's a number of actions after which I want to "warn" user that something, that he might want to rollback, has happened. Basically, I show the short version of this warning before user submits his request so it's more for assurance ( user开发者_开发问答 knows what he's doing ).
I use to render json notification with a bunch of other details from server with the appropriate status code, so that javascript then places notification accordingly ( like, if 201 then place json notification to 'green' div, if 422 then place it to 'red' div ).
So the question is, what might be the 'best fit' status code for 'yellow' div? Thanks!
How about:
203 Non-Authoritative Information
精彩评论