Rewrite get-resource as a method of the Resource protocol.