allow setting of default as-response function in resource