Code example for HttpPut

Methods: addHeader

0
	public HttpBundle create(Editable editable) throws CloudServersException {
		HttpResponse resp = null;
		CustomHttpClient httpclient = new CustomHttpClient(context);
		 
		String url = getSafeURL(Account.getAccount().getStorageUrl(), editable.toString());
		HttpPut put = new HttpPut(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) {