Added proxy support to http_request helper function