PHP
$data = array (
'jsonrpc' => '2.0',
'method' => 'Stream.GetMediaUrls',
'params' =>
array (
'cameras' =>
(object) array(
),
'ttl' => 3600,
),
'id' => 1,
);
$context = stream_context_create([
'ssl'=>['verify_peer' => false],
'http' => [
'method' => 'POST',
'header' => "Content-Type: application/json\r
Accept: application/json\r
Authorization: Bearer <api-authorization-token>\r
Content-Length: <Длина данных>",
'content'=>json_encode($data)
]
]);
$result = file_get_contents('https://your-domain/api/', false, $context);