]> git.datanom.net - qtadmin.git/blobdiff - lib/utils.inc.php
prepare for wblistadm server
[qtadmin.git] / lib / utils.inc.php
index e0ab45d868a7d3c7996343bd695c0c7e2f9567e1..f32e2095713e2e7ff4d998bf592c456611effd07 100644 (file)
@@ -384,7 +384,7 @@ class Utils {
         return $string;
     }
 
-    public function RESTCall($url, $data = null, $cookiesIn = '') {
+    public function RESTCall($url, $data = null, $cookiesIn = '', $headers = null) {
         $options = array(
             CURLOPT_RETURNTRANSFER => true,     // return web page
             CURLOPT_HEADER         => true,     //return headers in addition to content
@@ -405,6 +405,10 @@ class Utils {
             $options[CURLOPT_POSTFIELDS] = $data;
         }
 
+        if ($headers) {
+            $options[CURLOPT_HTTPHEADER] = $headers;
+        }
+
         $ch = curl_init($url);
         curl_setopt_array($ch, $options);
         $rough_content = curl_exec($ch);
This page took 0.029253 seconds and 5 git commands to generate.