'Entry point for REST API
@param r: the S3Request
@param attr: controller arguments'

def apply_method(self, r, **attr):

    if (r.representation == 'html'):
        return self._html(r, **attr)
    raise HTTP(405, current.ERROR.BAD_METHOD)
