RE: Re: [Restlet] Unsupported media type
Do you get the same 415 error when you go to /connection in your browser? (If so, then the problem is in your ServiceConnection class, rather then in your Android code). Also, in my Android code, I don't wrap the resource, but do the call directly on the ClientResource class, as in: Engine.getInstance().getRegisteredConverters().add(0, new JacksonConverter()); ClientResource commitsClient = new ClientResource(BASE_URL + commitments/); commitsClient.setEntityBuffering(true); Representation rep = commitsClient.post(commitDTO); Good luck! RB -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2963592
RE: Re: [Restlet] Unsupported media type
Thank you for your answer. No, it works when I use a web browser. I have the same error with the last code. I don't know if it's the android client or the web server which have a problem. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2963607
RE: Re: [Restlet] Unsupported media type
From the code that you have posted, I am not able to see the problem Perhaps the type of your connect variable doesn't match the type defined in your Server file. But that is just a guess. Good luck! RB -- View this message in context: http://restlet-discuss.1400322.n2.nabble.com/Restlet-Unsupported-media-type-tp7564930p7567390.html Sent from the Restlet Discuss mailing list archive at Nabble.com. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2963649