understanding REST Response and HTTP status code
问题 I wanted to know how I should respond in my REST API. Valid Example: http://blah.com/api/v1/dosomething/123 The above is a valid request and currently I have a HTTP Status of 200 with a JSON response { "dosomething": { "status": "OK", "results": "123" } } Now my question is, if the parameter passed is not valid ( I'm expecting a string of whole numbers ), do I return a HTTP Response of 200 and pass the error status back in the JSON response or should I pass something like a HTTP 400 response