From a8804eb95a6104ae830723c0110ff0bcda46407d Mon Sep 17 00:00:00 2001 From: dmzoneill Date: Tue, 13 Mar 2018 14:08:11 +0000 Subject: [PATCH] Curl fix for HTTP DELETE METHOD --- php-binance-api.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/php-binance-api.php b/php-binance-api.php index 24853ac7..4390b357 100644 --- a/php-binance-api.php +++ b/php-binance-api.php @@ -203,6 +203,12 @@ private function httpRequest($url, $method = "GET", $params = [], $signed = fals curl_setopt($ch, CURLOPT_POST, true); //curl_setopt($ch, CURLOPT_POSTFIELDS, $query); } + + // Delete Method + if($method == "DELETE") { + curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method); + } + // proxy settings if(is_array($this->proxyConf)) { curl_setopt($ch, CURLOPT_PROXY, $this->getProxyUriString());