'API entry point
@param r: the S3Request instance
@param attr: controller attributes for the request'

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

    if (r.http in ('GET', 'POST')):
        output = self.compose(r, **attr)
    else:
        r.error(405, current.ERROR.BAD_METHOD)
    return output
