diff --git a/src/Command/LoadWarrantySerialCommand.php b/src/Command/LoadWarrantySerialCommand.php index c4e35af5..41fcb15d 100644 --- a/src/Command/LoadWarrantySerialCommand.php +++ b/src/Command/LoadWarrantySerialCommand.php @@ -378,6 +378,26 @@ class LoadWarrantySerialCommand extends Command error_log(print_r($json_output, true)); // TODO: sent json output somewhere + + $curl = curl_init(); + + $options = [ + CURLOPT_URL => $this->base_url . '/' . $url, + CURLOPT_POST => true, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_POSTFIELDS => $body, + CURLOPT_HTTPHEADER => [ + 'Content-Type: application/json', + 'Ocp-Apim-Subscription-Key: ' . $this->sub_key, + 'Authorization: Bearer ' . $this->token, + ], + ]; + + curl_setopt_array($curl, $options); + $res = curl_exec($curl); + + curl_close($curl); + } }