From 7f92230a9f38a87ebd6bcd236e1359f9cbc79be6 Mon Sep 17 00:00:00 2001 From: veloriba Date: Sat, 17 Feb 2018 17:43:29 +0300 Subject: [PATCH] support body params for delete operation --- src/RestClient/RestClient.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/RestClient/RestClient.php b/src/RestClient/RestClient.php index 549b4d7..1629d1c 100644 --- a/src/RestClient/RestClient.php +++ b/src/RestClient/RestClient.php @@ -218,6 +218,9 @@ private function executeDelete($curlHandle, Request $request) { curl_setopt($curlHandle, CURLOPT_URL, $request->getServiceUrl() . $request->getOperation()); curl_setopt($curlHandle, CURLOPT_CUSTOMREQUEST, 'DELETE'); + if ($request->getParameters()) { + curl_setopt($curlHandle, CURLOPT_POSTFIELDS, $this->buildPostBody($request->getParameters())); + } return $this->doExecute($curlHandle, $request); }