Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Consider how it is being consumed. I would lean toward returning an actual empty list. A Success code might be sufficient, but the receiver still has to check to see if a list is returned and handle numerous branches. However if you always return the list (or whatever base object) a receiver on success knows it can always deserialise to a given type successfully (otherwise it is certain that the connection was prematurely terminated and it did not receive the entire response). Commented Aug 6, 2019 at 6:27
  • @Kain0_0 not about my preference, looking for api design refrence, what are the stblished patterns? Commented Aug 6, 2019 at 6:36
  • 1
    ? I'm failing to see how that was a preference. I pointed out the extra design effort being enforced on each and every client to handle a discontinuous edge case - and how homogeneity avoids that. As for references google it, everyone has a different opinion. As for Rigour, REST is quite clear about that. Take a read of the literature. Commented Aug 6, 2019 at 7:12
  • @Kain0_0 : Thank you for the academic refrence, the problem with google search is that I have already tried it and all I see is ideas of some company or blogger, nothing definitive as a text book or protocol definition. Commented Aug 6, 2019 at 7:59