Make a DELETE request

@param  string        $url
@param  array         $query_arguments
@return array|mixed
@throws EtcdException
546756
private function httpDelete($url, $query_arguments = [])
    {
        if (!empty($query_arguments)) {
            $url .= '?' . http_build_query($query_arguments);
        }

        $curl = $this->getCurlHandle($url);

        curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');

        return $this->executeCurlRequest($curl, $url);
    }
444074
public static function delete($urls, $data = null, callable $callback = null)
    {
        return static::make('delete', $urls, $data, $callback);
    }
1339242
def delete(url, options = {})
      connection(url, options) do |uri, conn|
        conn.delete(uri.request_uri, options)
      end
    end
628853
def delete_query(self, query_id):
        
        api = self._get_api(device_directory.DefaultApi)
        api.device_query_destroy(query_id)
        return
1343432
public function get($url, $queries = null, callable $callback = null)
    {
        if ( is_array($queries) )
        {
            $queries = '?' . http_build_query($queries);
        }

        return $this->send($url . $queries, self::GET, [], $callback);
    }
665838
public function delete(array $queryParams = [])
    {
        $response = $this->api->logs()->delete($queryParams);

        return new BaseResponse($response);
    }
57928
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;
    }
808789
def delete_by(params, request_options = {})
      raise ArgumentError.new('params cannot be nil, use the `clear` method to wipe the entire index') if params.nil?
      params = sanitized_delete_by_query_params(params)
      client.post(Protocol.delete_by_uri(name), params.to_json, :write, request_options)
    end
625695
public function deleteByKey($key, array $queryParams = [])
    {
        $response = $this->client->delete($this->uri($key), [
            'query' => $queryParams,
        ]);

        return $this->handleResponse($response);
    }
1036341
public function deleteAll(array $queryParams = [])
    {
        $response = $this->api->settings()->deleteAll($queryParams);

        return new BaseResponse($response);
    }
628518
protected function addQueryParams(array $queryParams, Uri $url): Uri
    {
        // New query parameters overrule the ones that should be kept
        $newQueryParamString = $url->getQuery();
        if (!empty($newQueryParamString)) {
            $newQueryParams = [];
            parse_str($newQueryParamString, $newQueryParams);
            $queryParams = array_replace_recursive($queryParams, $newQueryParams);
        }
        $query = http_build_query($queryParams, '', '&', PHP_QUERY_RFC3986);
        if ($query) {
            $url = $url->withQuery($query);
        }
        return $url;
    }
882669
public static function url( array $args = [], string $url = null ) {
		if ( is_null( $url ) ) {
			$url = $_SERVER['REQUEST_URI'];
		}

		return add_query_arg( $args, $url );
	}
371049
private static function resolveUrl(array $url, ?array $base, array $queryDefaults = []): array
    {
        if (null !== $base && '' === ($base['scheme'] ?? '').($base['authority'] ?? '')) {
            throw new InvalidArgumentException(sprintf('Invalid "base_uri" option: host or scheme is missing in "%s".', implode('', $base)));
        }

        if (null === $base && '' === $url['scheme'].$url['authority']) {
            throw new InvalidArgumentException(sprintf('Invalid URL: no "base_uri" option was provided and host or scheme is missing in "%s".', implode('', $url)));
        }

        if (null !== $url['scheme']) {
            $url['path'] = self::removeDotSegments($url['path'] ?? '');
        } else {
            if (null !== $url['authority']) {
                $url['path'] = self::removeDotSegments($url['path'] ?? '');
            } else {
                if (null === $url['path']) {
                    $url['path'] = $base['path'];
                    $url['query'] = $url['query'] ?? $base['query'];
                } else {
                    if ('/' !== $url['path'][0]) {
                        if (null === $base['path']) {
                            $url['path'] = '/'.$url['path'];
                        } else {
                            $segments = explode('/', $base['path']);
                            array_splice($segments, -1, 1, [$url['path']]);
                            $url['path'] = implode('/', $segments);
                        }
                    }

                    $url['path'] = self::removeDotSegments($url['path']);
                }

                $url['authority'] = $base['authority'];

                if ($queryDefaults) {
                    $url['query'] = '?'.self::mergeQueryString(substr($url['query'] ?? '', 1), $queryDefaults, false);
                }
            }

            $url['scheme'] = $base['scheme'];
        }

        if ('' === ($url['path'] ?? '')) {
            $url['path'] = '/';
        }

        return $url;
    }
101121
public static KieServerHttpRequest deleteRequest(final URL url ) throws KieServerHttpRequestException {
        KieServerHttpRequest request = new KieServerHttpRequest(url);
        request.getRequestInfo().requestMethod = DELETE;
        return request;
    }
950095
public function deletequery($queryId, $optParams = array())
  {
    $params = array('queryId' => $queryId);
    $params = array_merge($params, $optParams);
    return $this->call('deletequery', array($params));
  }
155592
public NextResponse delete(final String url, final Map<String, String> queries,
                               final Map<String, String> headers)
            throws IOException {
        return request(HttpMethod.DELETE, url, queries, null, headers);
    }
218459
def c_delete(api, args, verbose=False):
    
    obj = api.get_object(args['<URL>'].split('/')[-1])
    obj.delete()
    if verbose:
        return ['deleted object at', api.url(obj)]