Moving HTTP mechanics to helper class