REFACTOR: httpCreateUri

simplify to make it easier to prove correct