3 Commits

Author SHA1 Message Date
63d68d8921 Update Server.php 2023-02-14 20:28:58 +01:00
6f2b651a70 Update Server.php 2023-01-25 12:42:58 +01:00
a5f3d3d0fd Update Server.php 2023-01-25 12:39:15 +01:00

View File

@@ -36,18 +36,15 @@ class Server
} }
$payload = [ $payload = [
'header' => [ 'command' => $command,
'apikey' => $this->apiKey, 'params' => $attributes
'secret' => $this->apiSecret,
],
'body' => [
'command' => $command,
'params' => $attributes
]
]; ];
$token = base64_encode(sprintf('%s:%s', $this->apiKey, $this->apiSecret));
$response = $this->client->post("api.php", [ $response = $this->client->post("api.php", [
'headers' => [ 'headers' => [
'Authorization' => 'Basic ' . $token,
'Content-Type' => 'application/json', 'Content-Type' => 'application/json',
], ],
'body' => json_encode($payload) 'body' => json_encode($payload)