Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the easy-digital-downloads domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/danigirol0/www/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/danigirol0/www/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the metform domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/danigirol0/www/wp-includes/functions.php on line 6121
PETICION POST CURL - Dani Girol

PETICION POST CURL

$data=array("Name"=>@$miempleado->nombre,
"LastName"=>@$miempleado->apellidos,
);

$vars=json_encode($data);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"urlapi");
//curl_setopt($ch, CURLOPT_POST, 1);
//curl_setopt($ch, CURLOPT_POSTFIELDS,$vars); //Post Fields
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$headers = [
// 'X-Apple-Tz: 0',
//'X-Apple-Store-Front: 143444,12',
//'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*;q=0.8',
//'Accept-Encoding: gzip, deflate',
//'Accept-Language: en-US,en;q=0.5',
//'Cache-Control: no-cache',
'Content-Type: application/json',
// 'Host: www.example.com',
// 'Referer: http://www.example.com/index.php', //Your referrer address
//'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:28.0) Gecko/20100101 Firefox/28.0',
//'X-MicrosoftAjax: Delta=true',
'Authorization: Basic eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzZWFsYW5kdmlsbGFzIiwiZXhwIjoxNjk2NTM4ODI4fQ.UNqyeJ6CfbQ53PZutPtiBa0-EkG4HHtZpl24KfX1QHk'
];
//curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$server_output = curl_exec ($ch);

curl_close ($ch);
$decodificacion=json_decode($server_output);