run HttpConnection in a separate thread