]> git.datanom.net - qtadmin.git/blobdiff - rest_client.php
prepare for wblistadm server
[qtadmin.git] / rest_client.php
index f01be68fc0ceac7b85b3fc2d1b6f2528c6f1c0ef..33b9e53491bff187feab4ab4b306a04c4fd7630b 100644 (file)
@@ -30,6 +30,7 @@ $data = 'username=mir@miras.org&password=Clara0503';
 $response = $util->RESTCall($CFG->wblistadm_url.'/ticket', $data, $cookiesIn = '');
 if ($response['http_code'] >= 200 && $response['http_code'] <= 204) {
     $ticket = json_decode($response['content']);
 $response = $util->RESTCall($CFG->wblistadm_url.'/ticket', $data, $cookiesIn = '');
 if ($response['http_code'] >= 200 && $response['http_code'] <= 204) {
     $ticket = json_decode($response['content']);
+    $token = $ticket->data->CSRFPreventionToken;
     $cookies = $response['cookies'];
 }
 
     $cookies = $response['cookies'];
 }
 
@@ -48,7 +49,7 @@ if ($response['http_code'] >= 200 && $response['http_code'] <= 204) {
 <pre>
 <?php
 print_r($response);
 <pre>
 <?php
 print_r($response);
-print "Ticket: $ticket\nCookies: $cookies";
+print "Ticket: \n".var_export($ticket,true)."\nCookies: $cookies\nToken: $token";
 ?>
 </pre>
 </body>
 ?>
 </pre>
 </body>
This page took 0.037199 seconds and 5 git commands to generate.