mirror of
https://github.com/envoyr/php-froxlor-client.git
synced 2026-04-28 12:24:08 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 63d68d8921 | |||
| 6f2b651a70 | |||
| a5f3d3d0fd |
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user