1

When I POST to a Restlet, it says 415 Unsupported Media Type, but there are no stack traces, nothing in the log, no errors returned, nothing. I tried setting a breakpoint on the first line of the method and restarting the server in debug mode, but it fails before it even gets to the first line. How can I tell what is wrong?

A get request to a different method works fine.

Version

Restlet 2.1


I found out the REST client I was using, Advanced REST Client had a bug and the encoding was not being set correctly no matter what, even though I set it to application/json. I had to close the tab and reload it and then it worked. It would still be nice to find a way to debug to find out exactly the reason for an error.

Community
  • 1
  • 1
Chloe
  • 25,162
  • 40
  • 190
  • 357

1 Answers1

4

You can enable traces in Restlet, as described below:

Engine.setLogLevel(Level.FINEST);
Engine.setRestletLogLevel(Level.FINEST);

Hope it helps. Thierry

Thierry Templier
  • 198,364
  • 44
  • 396
  • 360