Hi,
I have a bug with the API.
I try this script :
He result to an error :
{"success":false,"code":406,"error":"invalid character 'u' looking for beginning of value"}
How to fix ?
Thanks
I have a bug with the API.
I try this script :
Code:
$sURL = "[URL]http://x:8088/api/v1/bot/login[/URL]"; // The POST URL
$sPD = "username=admin?password=foobar?botId=1"; // The POST Data
$aHTTP = array(
'http' => // The wrapper to be used
array(
'method' => 'POST', // Request Method
// Request Headers Below
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => $sPD
)
);
$context = stream_context_create($aHTTP);
$contents = file_get_contents($sURL, false, $context);
echo $contents;
{"success":false,"code":406,"error":"invalid character 'u' looking for beginning of value"}
How to fix ?
Thanks