Split httpGet into public and internal functions