Closed PedBerTor closed 7 years ago
assuming you're using Restlet, looks like you need to cr.getHeaders()
instead of cr.getRequestAttributes()
. http://stackoverflow.com/questions/9825790/add-headers-to-request-wrapped-by-clientresource-in-restlet
Hi, my name is Pedro and im making a hybrid application for a university project. Im trying to include kitsu but i have a problem. Following the api documentation i have to include these headers in every request:
"Accept": "application/vnd.api+json" "Content-Type": "application/vnd.api+json"
I have a Java class called KitsuResource that allow me obtain all animes filter by a "slug" (query). This one:![captura](https://cloud.githubusercontent.com/assets/16528784/25507986/884dee2c-2baf-11e7-96af-7c929c4a58ed.JPG)
The problem comes when i search for an anime because i always obtain the same request error:
org.restlet.resource.ResourceException: OK (406) - The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request
Hope you can help, this is very important for me and i cant find the solution. Thanks.