Closed amaltson closed 9 years ago
Everything is working correctly, it's just content negotiation issue. Only requests that has appropriate Accept
and Content-Type
header are processed by Katharsis. So the command should be
$ curl localhost:8080/projects -H "Accept: application/vnd.api+json" -i
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
Date: Thu, 04 Jun 2015 10:24:02 GMT
Content-Length: 25
{"data":[],"included":[]}
Currently it isn't written in the documentation, I'll update it. Thanks for the issue!
Huh, but according to the spec it should return a 415 not a 404. That's what threw me off. On Thu, Jun 4, 2015 at 6:31 AM Patryk Orwat notifications@github.com wrote:
Everything is working correctly, it's just content negotiation issue. Only requests that has appropriate Accept and Content-Type header are processed by Katharsis. So the command should be
$ curl localhost:8080/projects -H "Accept: application/vnd.api+json" -i HTTP/1.1 200 OK Content-Type: application/vnd.api+json Date: Thu, 04 Jun 2015 10:24:02 GMT Content-Length: 25
{"data":[],"included":[]}
Currently it isn't written in the documentation, I'll update it. Thanks for the issue!
— Reply to this email directly or view it on GitHub https://github.com/katharsis-project/katharsis.io/issues/4#issuecomment-108832882 .
I just checked, it did work. I should have tried with the headers... my bad. Thanks!
I guess two things were confusing:
I just couldn't find any way to inform JAX-RS about the resources and 415 messages without relying on a concrete implementation e.g. Jersey (https://jersey.java.net/documentation/latest/resource-builder.html). I still think if it's good to maintain such an implementation or just provide Jersey and forget about other implementations such as RESTeasy, CXF, ... As for now I added a new issue about logging such information: https://github.com/katharsis-project/katharsis-core/issues/43
I'm trying to run the getting started example that seems to be fully implemented. After adding the shade plugin, I started the dropwizard app, but it doesn't look like any of the repositories are registered.
So when I make any http requests to the
/projects
resource, I just get a 404.The full start log: