factor code that determines whether to use HTTP or HTTP::Proxy into a
get_http method