Hello Stephan,

well indeed that's what I'm doing right now. on the @Get-annoated
method I'm doing something like:

if (Method.HEAD.equals(getMethod()) { // HEAD req
} else { // GET req
}

Thanks.

On Thu, Jul 8, 2010 at 3:10 PM, Stephan Koops <stephan.ko...@web.de> wrote:
> Hi Fabian,
>
> because GET and HEAD have a very near semantic, it is the same. The only
> difference is, that you are not required to send the entity body.
> If you want to optimize, than you could get the method from the request,
> and than decide, if you have to read the full entity boy, for example.
> Don't forget, that you have to set the entity headers, also in HEAD.
>
> best regards
>   Stephan
>
> Fabian Mandelbaum schrieb:
>> Hello there,
>>
>> why doesn't Reslet (at least as of V2.0RC4) have an @Head annotation
>> to handle HEAD requests?
>>
>> Currently HEAD requests are being handled by GET handlers (at least
>> that's what's happening with my annotated resources). Why is this so?
>> Is there any reason why there's no @Head annotation?
>>
>> I'd need such annotation and wanted to hear about this before going on
>> and implementing the @Head annotation myself modelled based on @Get.
>> Thanks in advance
>
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2631048
>



-- 
Fabián Mandelbaum
IS Engineer

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2631449

Reply via email to