OK, I get it now: I have to get the content via a 'data' parameter, not by
calling getEntity() :-)
It now *almost* works perfectly.
I.e., my update method is called, I get the right data, I set the return status
to 'SUCCESS_OK' and I'm done. But the client gets a 'no content' code.
I'm
It's fine if I call setEntity() and return something/anything.
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3085219
Usually you just:
return someRepresentation; // This should automatically set status to HTTP
200 (OK)
or:
setStatus(Status.SUCCESS_CREATED); // Set status to HTTP 201
return someRepresentation;
where someRepresentation is the representation for the response you want
to return for the PUT
I have tried sending (PUT) with a content-type of text/plain (verified via
Fiddler). On the server side, I have tried:
@Put(text/plain)
@Put(text)
@Put(plain)
I still get the media error in all cases.
What am I doing wrong? Can I tell Restlet to accept *anything*?
@Put
should be enough to tell Restlet to accept anything
El jul 14, 2014 1:16 PM, Frank Kolnick reallyfr...@hotmail.com escribió:
I have tried sending (PUT) with a content-type of text/plain (verified
via Fiddler). On the server side, I have tried:
@Put(text/plain)
@Put(text)
@Put(plain)
Unfortunately, that does not appear to be the case. I.e., that's where I
started, and was getting the error. I tried the variations in order to fix the
problem, so far without success.
@Put
should be enough to tell Restlet to accept anything
El jul 14, 2014 1:16 PM, Frank Kolnick
Euh... I'm sorry but then the problem must be somewhere else.
I use @Put all the time, handling the different media types myself, and I
only got HTTP 415 when my own-written code explicitly threw
ResourceException(Status.CLIENT_ERROR_UNSUPPORTED_MEDIA_TYPE).
can you please try this on your
I get this error when issuing a PUT to a Restlet-based server.
Is there a way to tell Restlet to accept 'anything', i.e., all text-based
content?
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3084952
FYI, see follow-up here:
http://stackoverflow.com/questions/14409575/unsupported-media-type-415-with-generic-put-or-post
Jerome
2013/1/18 Darwin Airola darwinair...@gmail.com
Aloha!
I was trying to implement a generic put or post method in Restlet. (I was
able to implement a generic Get
:8080/user/ HTTP/1.1
User-Agent: Fiddler
Host: 127.0.0.1:8080
Content-Length: 53
Content-type: application/json
{
sid: as4ads68ds468486essf879g8de9sdg
}
---
RESPONSE:
HTTP/1.1 415 Unsupported Media Type
X-Powered-By: Servlet/3.0 JSP/2.2
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
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
/275-restlet/266-restlet.html
Good luck!
RB
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/Restlet-Unsupported-media-type-tp7564930p7566612.html
Sent from the Restlet Discuss mailing list archive at Nabble.com
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:
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.
--
-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
;);
cr.setRequestEntityBuffering(true);
ServiceConnection conn =
cr.wrap(ServiceConnection.class);
String temp = conn.connect(connect);
When I launch the client, I have the following message :
E/AndroidRuntime(1079): Unsupported Media Type (415
by ID and address for instance using GET.
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/Unsupported-Media-Type-415-tp5963113p7462259.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.
--
http
/Unsupported-Media-Type-415-tp5963113p7462259.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2948001
-
Bjorn Roche
http
I really have the same problem sooo any help plz
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/Unsupported-Media-Type-415-tp5963113p7451061.html
Sent from the Restlet Discuss mailing list archive at Nabble.com
I really have the same problem sooo any help plz
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/Unsupported-Media-Type-415-tp5963113p7451060.html
Sent from the Restlet Discuss mailing list archive at Nabble.com
What was your issue please??
How did you solve it!?
Thanks
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/415-Unsupported-Media-Type-me-too-tp5986547p6099636.html
Sent from the Restlet Discuss mailing list archive at Nabble.com
Hi Jerome,
No worries, thanks for your response :-)
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2702645
Hi Lads,
Could anyone give us some advice on this issue? It'd be really nice to get it
working.
Thanks :-)
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2701930
I'm just after finding another thread which appears to have a similar problem
http://restlet.tigris.org/issues/show_bug.cgi?id=1219
There's no answer for it yet though.
Is anyone looking at this thread? It's been more than a week now since this
issue was posted?
I did not want to hijack another thread if this is due to my own stupidity.
I use wget to call my service while I am debugging it in Eclipse and get the
415 Unsupported Media Type error. Calling command and code below. Any help
would be appreciated.
$ wget
--post-data'StatusId=3EndTime
I think I found my idiocy... nevermind
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2702094
Hi Bjorn,
Thanks very much for your help. Yes, in the mean time since I posted this
message I came to the same conclusion too, however, using plain java objects
with REST was really what was attracting me most with Restlet, so if I could
find a way to avoid using forms altogether it'd be very
My ContactServerResource is similar to the example:
@Get
public Contact retrieve(Contact contact) {
return contact;
}
@Put
public void store(Contact contact) {
ContactServerResource.contact = contact;
}
I am also a noob,
.
However, if I place a Contact object as a parameter it is always received as
null.
The method causing most problems is the @Put method.
When I call the store method, the client throws the following:
Caused by: Unsupported Media Type (415) - OK
at
org.restlet.resource.ClientResource$1
Hello,
thansk Avi, I've completed the issue 1172
(http://restlet.tigris.org/issues/show_bug.cgi?id=1172).
Best regards,
Thierry Boileau
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2654055
Hi all,
I'm using 2.0 jse. I've got a method that has this signature:
@Post(form)
public Representation accept(Form form) throws ResourceException {
Everything generally works fine, but when I send a request with an
unsupported Content-Type — text/plain, say — the service returns 405
Method Not
I believe that's a 415.
Jon
On 27/08/10 19:33, Avi Flax wrote:
Hi all,
I'm using 2.0 jse. I've got a method that has this signature:
@Post(form)
public Representation accept(Form form) throws ResourceException {
Everything generally works fine, but when I send a request with an
Ah, yes, definitely. My bad, thanks.
On Fri, Aug 27, 2010 at 16:27, Jonathan Hall jonrh...@gmail.com wrote:
I believe that's a 415.
Jon
On 27/08/10 19:33, Avi Flax wrote:
Hi all,
I'm using 2.0 jse. I've got a method that has this signature:
@Post(form)
public Representation
Hello Gabriel,
this is a very good question which has no answer yet, I think.
I've entered a new RFE =
http://restlet.tigris.org/issues/show_bug.cgi?id=637
Right now I do the following, is this the way to go?
That's fine for me.
Best regards,
Thierry Boileau
--
Restlet ~ Core developer ~
Hi, there is a standard way to tell the framework which media types is
supported on a GET via getVariants().add(...). Is there a similar way
to tell the framework which media types a resource accepts on
POST/PUT?
Right now I do the following, is this the way to go?
/**
* Handle POST request
*/
36 matches
Mail list logo