Allow recognize method to accept resource instead url