Code example for HttpDelete

Methods: addHeader

0
 
	public HttpBundle delete(String string) throws CloudServersException {
		HttpResponse resp = null;
		CustomHttpClient httpclient = new CustomHttpClient(context);
		String url = getSafeURL(Account.getAccount().getStorageUrl(), string);
		HttpDelete put = new HttpDelete(url);
		 
		put.addHeader("X-Auth-Token", Account.getAccount().getAuthToken());
		httpclient.removeRequestInterceptorByClass(RequestExpectContinue.class);
 
		HttpBundle bundle = new HttpBundle();
		bundle.setCurlRequest(put);
		 
		try { 
			resp = httpclient.execute(put);
			bundle.setHttpResponse(resp);
		} catch (ClientProtocolException e) {
			CloudServersException cse = new CloudServersException();
			cse.setMessage(e.getLocalizedMessage());
			throw cse;
		} catch (IOException e) {