Skip to content
This repository was archived by the owner on Oct 20, 2020. It is now read-only.

Latest commit

 

History

History
24 lines (16 loc) · 727 Bytes

sync-delete.md

File metadata and controls

24 lines (16 loc) · 727 Bytes

AsyncHttpClient Example DELETE

Example DELETE

	SyncHttpClient<JsonElement> client = new SyncHttpClient<JsonElement>("http://example.com");
	JsonElement response = client.delete("api/v1/", new JsonResponseHandler());

Example DELETE with parameters and headers

	SyncHttpClient<JsonElement> client = new SyncHttpClient<JsonElement>("http://example.com");

	List<NameValuePair> params = new ArrayList<>();
	params.add(new NameValuePair("key", "value"));

	Headers headers = Headers.of("Header", "value");

	JsonElement response = client.delete("api/v1/", params, headers, new JsonResponseHandler());

	// Delete the connection info
	ConnectionInfo connectionInfo = client.getConnectionInfo();