204 10th St - SPORTS

I know that a 204 - No Content is okay for an HTTP POST-Request. For GET request, if no data is to be sent back, is the 204 status code appropriate? Should I use 404, or just stick to 200 for success but have an empty response?

The use case for this question is a Java application that I am writing for Google App Engine. HTTP Get with 204 No Content: Is that normal - Stack Overflow What is the difference between 201 status code and 204 status code Asked 3 years, 7 months ago Modified 1 year, 1 month ago Viewed 17k times What is the difference between 201 status code and 204 status code DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704 Asked 12 years, 3 months ago Modified 3 years, 8 months ago Viewed 136k times The 204 response to PUT is not a mandatory requirement for OData servers (note that the odata.org is not a normative reference, the MS-OData document is). You can return 200 with body, in which case the body you return should be a serialization of the updated entity (after the updates were applied by the server). Is it valid to return a body along with an Http 204 status?

204 10th st, 204 No Content A resposta 204 não deve ser usada para indicar que a busca não teve resultados. Semanticamente falando - e é isso que importa quando analisamos a fundo qual resposta utilizar - quando fazemos uma busca esperamos como resultado uma lista; quando a busca não possui resultados, será esperado que recebemos uma lista vazia.