Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
 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;
 }