Hi Koot, Regarding the annotation syntax, @Post("*:txt|json") should be expressed @Post(":txt|json") or @Post("txt|json") if preferences are the same for both request and response entities.
Are you sure you client is properly setting the media type (Content-Type HTTP header)? Could you send a small test case reproducing the issue? Thanks, Jerome -- http://www.restlet.com http://twitter.com/#!/jlouvel -----Message d'origine----- De : Koot [mailto:k...@beyondwireless.co.za] Envoyé : jeudi 16 août 2012 11:48 À : discuss@restlet.tigris.org Objet : 415 Unsupported Media Type Hi Sorry if this is explained and resolved elsewhere, but I could not come right with any explanations found elsewhere on the forum. I am trying to do a simple POST of plain text into my RESTlet API. I'm using the annotation @Post("*:txt|json"). There is however just NO way to get the content into the API without the stupid 415 error. Odd thing is this - if I do a print of getVariants().toString() in my method handling my @Get("*|txt/json") then it prints this: [[text/plain], [application/json]] If I do the same for the @Post("*:txt/json")'s method however, I get a big fat empty array: [] Any ideas? I'm pulling out my hair here :( Thanks ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=29988 51 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2999316