DELETE call to a Nexpose controller.

 @param [Connection] nsc API connection to a Nexpose console.
 @param [String] uri Controller address relative to https://host:port
 @param [String] content_type Content type to use when issuing the DELETE.
762404
def delete(nsc, uri, content_type = CONTENT_TYPE::XML)
      delete = Net::HTTP::Delete.new(uri)
      delete.set_content_type(content_type)
      request(nsc, delete)
    end
174756
public void doHttpPost(String url, HttpResponse result, Map<String, Object> headers, String contentType) {
        httpClient.post(url, result, headers, contentType);
    }
1352771
def delete(self, request, uri):
        
        uri = self.decode_uri(uri)
        uris = cio.delete(uri)

        if uri not in uris:
            raise Http404

        return self.render_to_response()
700040
@Override
	public Result<Void> deleteNS(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp, String ns) {
		TimeTaken tt = trans.start(DELETE_NS + ' ' + ns, Env.SUB|Env.ALWAYS);
		try {
			Result<Void> rp = service.deleteNS(trans,ns);
			switch(rp.status) {
				case OK: 
					setContentType(resp,nsRequestDF.getOutType());
					return Result.ok();
				default:
					return Result.err(rp);
			}
		} catch (Exception e) {
			trans.error().log(e,IN,DELETE_NS);
			return Result.err(e);
		} finally {
			tt.done();
		}
	}
1097327
def set_content_type(self, content_type):
        
        self.policies.append(('eq', '$Content-Type', content_type))
        self.form_data['Content-Type'] = content_type
1010169
def delete_resource(uri)
      clear
      uri = URI.parse(uri)
      @req = Net::HTTP::Delete.new uri.request_uri
      set_common_info(@req)
      @http_class.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
        @res = http.request(@req)
        case @res
          when Net::HTTPSuccess
            #warn "Bad Status Code: #{@res.code}" unless @res.class == Net::HTTPOK || @res.class == Net::HTTPNoContent
          else
            raise RequestError, "Failed to delete resource. #{@res.code}"
          end
      end
    end
1008347
public void deleteByQuery(String index, String type) throws IOException {
        logger.debug("deleteByQuery [{}]/[{}]", index, type);

        String deleteByQuery = "{\n" +
                "  \"query\": {\n" +
                "    \"match_all\": {}\n" +
                "  }\n" +
                "}";

        HttpEntity entity = EntityBuilder.create().setText(deleteByQuery).setContentType(ContentType.APPLICATION_JSON).build();
        Response restResponse = lowLevelClient.performRequest("POST", "/" + index + "/" + type + "/_delete_by_query", Collections.emptyMap(), entity);
        Map<String, Object> response = asMap(restResponse);
        logger.debug("reindex response: {}", response);
    }
668482
def delete_connection(api)
      @subscribers.delete_if {|x| x.api == api}
      @publishers.delete_if {|x| x.api == api}
      @services.delete_if {|x| x.api == api}
    end
139235
def delete_content_item(access_token, content_item_id):
	'''
	
	'''

	headers = {'Authorization': 'Bearer ' + str(access_token)}
	content_item_url =\
		construct_content_item_url(enrichment_url, content_item_id)

	request = requests.delete(content_item_url, headers=headers)
	return {'status': request.status_code, 'message': request.text}
754571
public static HttpResponse request(HttpRequest request, String body, String contentType) {
        return request.contentType(contentType).body(body).contentLength(body.length()).execute();
    }
107548
public void deleteBulkDocsAsync(String index, String type) {
        executeBulkRequestAsync(buildDeleteBulkRequestBuilder(
                buildAllDeleteRequestBuilderList(index, type)));
    }
845343
public void deleteIfNoneMatch(URI uri, String eTag,
			Header[] additionalRequestHeaders, Credentials credentials) {
		ra.getExecutorService().execute(
				new AsyncDeleteIfNoneMatchHandler(ra, handle, uri, eTag,
						additionalRequestHeaders, credentials));
	}
1306468
def deletePortMapping(nport,proto)
            checkProto(proto)
            checkPort(nport)
            joinThread()
            r = MiniUPnP.UPNP_DeletePortMapping(@urls.controlURL,@data.servicetype,
                                               nport.to_s,proto)
            if r != 0 then
                raise UPnPException.new , "Failed delete mapping: #{code2error(r)}."
            end
        end
963301
public static base_responses delete(nitro_service client, String xmlcontenttypevalue[]) throws Exception {
		base_responses result = null;
		if (xmlcontenttypevalue != null && xmlcontenttypevalue.length > 0) {
			appfwxmlcontenttype deleteresources[] = new appfwxmlcontenttype[xmlcontenttypevalue.length];
			for (int i=0;i<xmlcontenttypevalue.length;i++){
				deleteresources[i] = new appfwxmlcontenttype();
				deleteresources[i].xmlcontenttypevalue = xmlcontenttypevalue[i];
			}
			result = delete_bulk_request(client, deleteresources);
		}
		return result;
	}
44247
def delete(header = self.class::DEFAULT_REQUEST_HEADER)
      ensure_client && ensure_uri
      response = @client.rest_delete(@data['uri'], header, @api_version)
      @client.response_handler(response)
      true
    end
981783
protected function exec($method, $uri, $data, $content_type)
    {
        $connect = $this->getConnect($uri, $method, $content_type);
        if ($data) {
            $this->setData($connect, $data, $content_type);
        }

        $api_result = curl_exec($connect);
        $api_http_code = curl_getinfo($connect, CURLINFO_HTTP_CODE);
        $api_http_time = curl_getinfo($connect, CURLINFO_TOTAL_TIME);

        $response = array(
            "status" => $api_http_code,
            "total_time" => $api_http_time,
        );

        if ($content_type == "application/json") {
            $response["response"] = json_decode($api_result, true);
        } elseif ($content_type == "text/html") {
            $response["response"] = $api_result;
        }

        if ($response['status'] >= 400) {
            throw new Exception($response['response'], $response['status']);
        }

        curl_close($connect);

        return $response;
    }
980712
@Override
	public synchronized void delete(int type, String url) throws DatabaseException {
    	try {
			psDeleteUrls.setInt(1, type);
			psDeleteUrls.setString(2, url);
			psDeleteUrls.executeUpdate();
		} catch (SQLException e) {
			throw new DatabaseException(e);
		}
    }