Create HTTPConnection object in seperate function. Can be overridden