first prototype sending api request

This commit is contained in:
Jabir 2023-11-03 11:58:43 +01:00
parent 900ffdb56f
commit a6f2a4fac7

View file

@ -15,6 +15,7 @@ class ClearQueuePrinterController
{
$printer = Printer::find($id);
$data = request()->input('params');
$baseUrl = 'http://' .$printer->config->networkFormat();
@ -26,9 +27,8 @@ class ClearQueuePrinterController
$url = $baseUrl . '/server/job_queue/job';
$query = [];
$data= [];
$method = 'post';
$method = 'delete';
$response = $httpClient->{$method}($url, $method === 'get' ? $query : $data);
dd($response);