Timeline for Use 404 or 200 when null result (REST)
Current License: CC BY-SA 4.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 4, 2019 at 10:06 | history | edited | Pete | CC BY-SA 4.0 | Use quote formatting for quotes |
| Nov 4, 2019 at 8:44 | comment | added | Pete | @JimmyJames Well put, I took the liberty of adding that to the answer | |
| Nov 4, 2019 at 8:42 | history | edited | Pete | CC BY-SA 4.0 | Added phrase from JimmyJanes in the comments |
| Nov 1, 2019 at 15:51 | comment | added | JimmyJames | In a nutshell, 404 means "I don't know what you are referring to". This is very different from, "I know exactly what you are asking but there's no data." The only exception here is that the RFC says you can use 404 as a substitute for 403 forbidden to avoid confirming the existence of the URI to an unauthorized user. | |
| Nov 1, 2019 at 11:14 | history | edited | Pete | CC BY-SA 4.0 | Fix missing word |
| Nov 1, 2019 at 11:14 | comment | added | gnasher729 | That's the correct answer. The server has a response it can report, and it is the correct response, therefore it should be status 200. An array is very practical to report 0, 1 or more items in a response. And the client only has to check for status 200 (I've got a correct response), or anything else (something went wrong). | |
| Nov 1, 2019 at 10:21 | history | answered | Pete | CC BY-SA 4.0 |