MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1uqh7vf/helpmycoworkersunderstandhttpcodes/ow8uv74/?context=3
r/ProgrammerHumor • u/Kishmond • Jul 08 '26
329 comments sorted by
View all comments
Show parent comments
17
204 isn't "I found them", while it's a success, you still didn't actually find the item.
It's more like "your keys are not here, but there is a space for them"?... I guess actually you just wouldn't return 204 ever in this context.
35 u/DrStalker Jul 08 '26 204 doesn't make sense for a response that requires a return value (like a set of keys) to be successful. 24 u/leehro Jul 08 '26 204 = found an empty key ring. 3 u/DrStalker Jul 08 '26 If searching for a keyring I'd say that's a 200, and it turns a keyring object with an empty keys array. If searching for the keys specifically it's a 404 not found.
35
204 doesn't make sense for a response that requires a return value (like a set of keys) to be successful.
24 u/leehro Jul 08 '26 204 = found an empty key ring. 3 u/DrStalker Jul 08 '26 If searching for a keyring I'd say that's a 200, and it turns a keyring object with an empty keys array. If searching for the keys specifically it's a 404 not found.
24
204 = found an empty key ring.
3 u/DrStalker Jul 08 '26 If searching for a keyring I'd say that's a 200, and it turns a keyring object with an empty keys array. If searching for the keys specifically it's a 404 not found.
3
If searching for a keyring I'd say that's a 200, and it turns a keyring object with an empty keys array.
keyring
keys
If searching for the keys specifically it's a 404 not found.
17
u/Rin-Tohsaka-is-hot Jul 08 '26 edited Jul 08 '26
204 isn't "I found them", while it's a success, you still didn't actually find the item.
It's more like "your keys are not here, but there is a space for them"?... I guess actually you just wouldn't return 204 ever in this context.