This commit is contained in:
dev-chiefworks
2022-04-20 20:52:54 -04:00
parent 5b5ed22738
commit c31a17874a
3 changed files with 28 additions and 3 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ use GuzzleHttp\Client as HTTPClient;
class CoreServiceApi
{
public static function NodeServiceApi($url_path, $data){
public static function NodeServiceApi($url_path, $data_json){
$ch = curl_init();
@@ -15,7 +15,7 @@ public static function NodeServiceApi($url_path, $data){
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
// curl_setopt($ch, CURLOPT_POSTFIELDS, "{'username':'$username','password':'$password',\"sessionid\":\"DUMMYSESSION\"}");
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"username\":\"$username\",\"password\":\"$password\",\"sessionid\":\"DUMMYSESSION\"}");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_json);
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
$headers = array();