From a6f2a4fac749bb5611b7c5d316e5bba0db6246e3 Mon Sep 17 00:00:00 2001 From: Jabir Date: Fri, 3 Nov 2023 11:58:43 +0100 Subject: [PATCH] first prototype sending api request --- .../Controllers/Api/Printer/ClearQueuePrinterController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/Printer/ClearQueuePrinterController.php b/app/Http/Controllers/Api/Printer/ClearQueuePrinterController.php index 004ddf9..27de9fb 100644 --- a/app/Http/Controllers/Api/Printer/ClearQueuePrinterController.php +++ b/app/Http/Controllers/Api/Printer/ClearQueuePrinterController.php @@ -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);