Add template function to execute subrequests.