I'd like to see a server-side enhancement to fetch all the variables in one call. 

This code can fall back on fetching variables one at a time in case the optimized method returns HTTP 404.