Thanks for the answer.

We are currently developing a new REST API for our proprietary CMS and
it will have support for HEAD requests, this is, as you mentioned, the
server wont process the full request as if it was a GET but return a
different response instead.

Since we use MooTools a lot for our front end development, it would be
nice to have a support for this.




On Sat, May 15, 2010 at 9:30 PM, Sanford Whiteman
<[email protected]> wrote:
>> The  Request  class  can  handle  GET,  POST,  PUT  and  DELETE HTTP
>> requests, but I haven't seen anything regarding HEAD requests. These
>> can  be  easily  done with curl or Python, for example. Any ideas of
>> how to implement HEAD requests with ajax and MooTools?
>
> I  think  some  changes are necessary in core; I haven't looked at the
> source  but  method:  'HEAD'  seems  to be swallowed and turned into a
> POST.
>
> IMO,  HEAD  is overrated. It may explicitly conserve bytes on the wire
> but  doesn't  necessarily conserve processing on the server unless you
> specifically code for it.
>
> For  example,  you  can  stick  with  GET and add a custom header like
> x-http-method:  HEAD,  then  have  the  server-side code intelligently
> short-circuit  processing  and  just  send  the  response  headers and
> exit...  that's  more  efficient  than  a  dumb HEAD, where the server
> executes  all  the  server-side  code  and then the SAPI layer blindly
> truncates the response.
>
> -- S.
>
>



-- 
Eneko Alonso
Software Engineer
http://enekoalonso.com
San Luis Obispo, California

Reply via email to