cqpCow 1 жил өмнө
parent
commit
e4319878fb

+ 6 - 1
app/Http/Controllers/Api/TestController.php

@@ -1320,7 +1320,11 @@ public function testaa(Request $request){
     $header = $data['header'];
 
     $curl = curl_init();
-    $json = json_encode($post);
+    if(empty($post)){
+        $json = json_encode((object)$post);
+    }else{
+        $json = json_encode($post);
+    }
 //    $json = str_replace('"workflowSearchBean":{}','"workflowSearchBean":[]',json_encode($post));
     $json = str_replace('"workflowSearchBean":[]','"workflowSearchBean":{}',$json);
     $json = str_replace('"loginBindingParameters":[]','"loginBindingParameters":{}',$json);
@@ -1337,6 +1341,7 @@ public function testaa(Request $request){
         CURLOPT_CUSTOMREQUEST => 'POST',
         CURLOPT_POSTFIELDS => $json,
         CURLOPT_HTTPHEADER => $header,
+        CURLOPT_SSL_VERIFYPEER =>false,
     ));
     $response = curl_exec($curl);
     curl_close($curl);