public function request($post) { $proxy = $this->getProxy(); if ($proxy !== null && $proxy->host !== null && strlen($proxy->host) > 0) { $hpa = $proxy->auth; if ($hpa->user !== null && strlen($hpa->user) > 0) { $data = _hx_deref(new com_wiris_system_Base64())->encodeBytes(haxe_io_Bytes::ofString($hpa->user . ":" . $hpa->pass))->toString(); $this->setHeader("Proxy-Authorization", "Basic " . $data); } } parent::request($post); }
static function log2($v, $i = null) { $msg = null; if ($i !== null) { $msg = _hx_string_or_null($i->fileName) . ":" . _hx_string_rec($i->lineNumber, "") . ":" . _hx_string_or_null($i->methodName) . ":"; } else { $msg = ""; } $msg .= Std::string($v); $http = new haxe_Http("http://localhost/devel/php/jsLog.php"); $http->setParameter("log", $msg); $http->onData = array(new _hx_lambda(array(&$http, &$i, &$msg, &$v), "me_cunity_debug_Out_0"), 'execute'); $http->request(true); }
static function requestUrl($url) { $h = new haxe_Http($url); $r = null; $h->onData = array(new _hx_lambda(array(&$h, &$r, &$url), "haxe_Http_6"), 'execute'); $h->onError = array(new _hx_lambda(array(&$h, &$r, &$url), "haxe_Http_7"), 'execute'); $h->request(false); return $r; }