If I see this, I'm immediately changing API: HTTP 200 { "error": "..." }
@darylphuahАй бұрын
First tip only applies if you're creating a RESTful API, if you're not, then it actually make sense to use verbs. You can handle much more complex logic and data structures in a single request rather than splitting them up into multiple chained rest APIs. 2nd tip is also bad because you're mixing up the REST endpoint entities with query filters. 3rd tip is common sense, but is sadly lacking in real world practice. 4th is duh? Overall, dislike
@rumoneanderson270Ай бұрын
The first tip was great, the second one needs some work
@hamoodrexАй бұрын
This is great. But I have to disagree on the importance of giving 201 for a created resource. If the request is documented to have a purpose of creating a resource, then what else could 200 OK mean? I do agree however that it is necessary to give relevant error codes since the outcomes may differ such as something was not found or you're not authenticated etc... but when it comes to Success messages, I don't see a point telling the person again what their purpose was
@TridentForUАй бұрын
Or, hear me out, you write your API the way it makes sense for you and everybody else writes their API the way it makes sense for them and we all write really good documentation....
@3x10.8_msАй бұрын
disliked by me
@aow6813Ай бұрын
NO PLS DONT DESTROY HIS CARRER SHOW MERCY @3x10.8_ms