Fred Friis
04/27/2023, 1:21 PMYoussef Shoaib [MOD]
04/27/2023, 1:25 PMnot found
states.
Also, as long as you design your clients and servers well, the rest API itself will be an implementation detail that can easily change and evolve, so I'd say focus on the domain of your data and what fits best for it, and the rest apis can be changed when need be.Fred Friis
04/27/2023, 1:51 PMjson by defaultlikewise 🙂 but it doesn't say much about the style of response eg do you return the object directly or surronded by meta json (like json api standard does) and re clients, how much do you optimize for them vs more academic correctness (as for me, sometimes, I lean towards reducing the number of ways the api responds in different cases so clients have to worry less about handling 200 object, 200 but no object, 201, 204, 404 nothing found etc etc (even if that would technically be more correct or whatever) obviously you can't do that for everything, eg GET user/xyz if no such user exists, you can't return 2xx and an empty user lol but yeah basically sometimes favor reducing the number of different responses vs technical correctness as long as it's not super unidiomatic