3 Commits
0.10.38 ... 2.x

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 = [
'header' => [
'apikey' => $this->apiKey,
'secret' => $this->apiSecret,
],
'body' => [
'command' => $command,
'params' => $attributes
]
'command' => $command,
'params' => $attributes
];
$token = base64_encode(sprintf('%s:%s', $this->apiKey, $this->apiSecret));
$response = $this->client->post("api.php", [
'headers' => [
'Authorization' => 'Basic ' . $token,
'Content-Type' => 'application/json',
],
'body' => json_encode($payload)