src/CurlInterface.php
public function deleteReq(string $url, $data = [], $dataQuery = [])
    {
        $query  = http_build_query($dataQuery);
        $params = implode('/', $data);
        $ch     = curl_init($url . $params . '?' . $query);
        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        if ($this->authType == self::BASIC) {
            curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
            curl_setopt($ch, CURLOPT_USERPWD, $this->authParam);
        } else {
            if ($this->authType == self::SAFE) {
                curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANYSAFE);
                curl_setopt($ch, CURLOPT_USERPWD, $this->authParam);
            }
        }
        $result = curl_exec($ch);
        curl_close($ch);

        return $result;
    }
public function deleteReq(string $url, $data = [], $dataQuery = [])
    {
        $query  = http_build_query($dataQuery);
        $params = implode('/', $data);
        $ch     = curl_init($url . $params . '?' . $query);
        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        if ($this->authType == self::BASIC) {
            curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
            curl_setopt($ch, CURLOPT_USERPWD, $this->authParam);
        } else {
            if ($this->authType == self::SAFE) {
                curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANYSAFE);
                curl_setopt($ch, CURLOPT_USERPWD, $this->authParam);
            }
        }
        $result = curl_exec($ch);
        curl_close($ch);

        return $result;
    }
public function deleteReq ( string $ url , $ data = [ ] , $ dataQuery = [ ] ) { $ query = http_build_query ( $ dataQuery ) ; $ params = implode ( '/' , $ data ) ; $ ch = curl_init ( $ url . $ params . '?' . $ query ) ; curl_setopt ( $ ch , CURLOPT_CUSTOMREQUEST , "DELETE" ) ; curl_setopt ( $ ch , CURLOPT_RETURNTRANSFER , true ) ; if ( $ this -> authType == self :: BASIC ) { curl_setopt ( $ ch , CURLOPT_HTTPAUTH , CURLAUTH_BASIC ) ; curl_setopt ( $ ch , CURLOPT_USERPWD , $ this -> authParam ) ; } else { if ( $ this -> authType == self :: SAFE ) { curl_setopt ( $ ch , CURLOPT_HTTPAUTH , CURLAUTH_ANYSAFE ) ; curl_setopt ( $ ch , CURLOPT_USERPWD , $ this -> authParam ) ; } } $ result = curl_exec ( $ ch ) ; curl_close ( $ ch ) ; return $ result ; }
Send a DELETE request with its data as PARAMS

@param string $url       Url to call
@param array  $data      Simple array with params to be passed
@param array  $dataQuery Key-value array to be json_encoded

@return string request result
Send a DELETE request with its data as PARAMS