Resolve "CAPI call for warranty serial" #1632

Merged
korina.cordero merged 18 commits from 704-capi-call-for-warranty-serial into master 2022-09-23 03:14:28 +00:00
Showing only changes of commit d9aaea928c - Show all commits

View file

@ -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);
}
}