RE: Checking for Request Entity
FYI, a related issue has been entered by Avi : “When a POST request has no request entity, isEntityAvailable() returns true” http://restlet.tigris.org/issues/show_bug.cgi?id=869 Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org/ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com/ http://www.noelios.com De : Avi Flax [mailto:a...@arc90.com] Envoyé : mardi 4 août 2009 21:54 À : discuss@restlet.tigris.org Objet : Re: Checking for Request Entity On Tue, Jul 28, 2009 at 05:34, webp...@tigris.org wrote: Dont know why getRequest().isEntityAvailable() returns true, however getRequest().getEntity().getMediaType() return null if the request entity is missing. OK, thanks, that's helpful. I'd still like to understand the behavior though. Can anyone help? -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2384285
Re: Checking for Request Entity
On Tue, Jul 28, 2009 at 05:34, webp...@tigris.org wrote: Dont know why getRequest().isEntityAvailable() returns true, however getRequest().getEntity().getMediaType() return null if the request entity is missing. OK, thanks, that's helpful. I'd still like to understand the behavior though. Can anyone help? -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2380138
RE: Checking for Request Entity
Dont know why getRequest().isEntityAvailable() returns true, however getRequest().getEntity().getMediaType() return null if the request entity is missing. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2376246
Checking for Request Entity
Hi all, quick question: I'm using Restlet 1.1.5 to write a quick API stub. I want a resource to allow POST only, and to request that a request entity be sent. The thing that's odd is, when I use curl to test a request without an entity, like so: curl -v -X POST http://localhost:3000/path/to/resource then in my Resource subclass, when I call getRequest().isEntityAvailable() it returns true! This isn't what I expected. Can someone explain why isEntityAvailable() is returning true in this case, and/or suggest a different way to check whether a request entity has been sent? Thanks! Avi -- Avi Flax » Partner » Arc90 » http://arc90.com -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2376034