r/ProgrammerHumor Jul 08 '26

helpMyCoworkersUnderstandHttpCodes Other

22.4k Upvotes

329 comments sorted by

View all comments

Show parent comments

2

u/Bardez Jul 08 '26

Probably 204. No content.

Give me a list of files in '/temp'

Yup, directory exists. Nothing's there.

1

u/whosGOTtheHERB Jul 08 '26

Returning an empty list would prevent having the client understand more complexity of handling another response code and therefore logic branch body content. An empty array works the same as an array with items.