http and uri creation moved to new method