factor out common code in GET reqs