Skip to content

Instantly share code, notes, and snippets.

@tugberkugurlu
Created June 25, 2014 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tugberkugurlu/96e0c758fc501c5944c9 to your computer and use it in GitHub Desktop.
Save tugberkugurlu/96e0c758fc501c5944c9 to your computer and use it in GitHub Desktop.
GET http://localhost:25135/api/cars HTTP/1.1
User-Agent: Fiddler
Accept: application/json
Host: localhost:25135
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Date: Wed, 25 Jun 2014 12:36:48 GMT
Content-Length: 68
[]
GET http://localhost:25135/api/cars HTTP/1.1
User-Agent: Fiddler
Accept: application/json
Host: localhost:25135
HTTP/1.1 404 Not Found
Date: Wed, 25 Jun 2014 12:36:52 GMT
Content-Length: 0
@tugberkugurlu
Copy link
Author

The question here is this: if you are returning a collection of things through your response body, would it make sense to return 404 if you don't have any item to fill the array? My money is on 200 here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment