first prototype sending api request
This commit is contained in:
parent
900ffdb56f
commit
a6f2a4fac7
1 changed files with 2 additions and 2 deletions
|
@ -15,6 +15,7 @@ class ClearQueuePrinterController
|
||||||
{
|
{
|
||||||
$printer = Printer::find($id);
|
$printer = Printer::find($id);
|
||||||
|
|
||||||
|
$data = request()->input('params');
|
||||||
|
|
||||||
$baseUrl = 'http://' .$printer->config->networkFormat();
|
$baseUrl = 'http://' .$printer->config->networkFormat();
|
||||||
|
|
||||||
|
@ -26,9 +27,8 @@ class ClearQueuePrinterController
|
||||||
$url = $baseUrl . '/server/job_queue/job';
|
$url = $baseUrl . '/server/job_queue/job';
|
||||||
|
|
||||||
$query = [];
|
$query = [];
|
||||||
$data= [];
|
|
||||||
|
|
||||||
$method = 'post';
|
$method = 'delete';
|
||||||
$response = $httpClient->{$method}($url, $method === 'get' ? $query : $data);
|
$response = $httpClient->{$method}($url, $method === 'get' ? $query : $data);
|
||||||
|
|
||||||
dd($response);
|
dd($response);
|
||||||
|
|
Loading…
Reference in a new issue