private Boolean writeData(String data){
		
		try {
			URL url = new URL(this.curlURL);
			String auth = this.authType.name().toLowerCase();
			char[] stringArray = auth.trim().toCharArray();
			stringArray[0] = Character.toUpperCase(stringArray[0]);
	 		auth = new String(stringArray);

			
			HttpUriRequest req = null;
			StringEntity strEntity = new StringEntity(data.replace(" ", "+"), "UTF-8");
			if(this.type.equals(UploadType.POST)){
				HttpPost post = new HttpPost(this.curlURL);
				post.setEntity(strEntity);
				req = post;
				
			}
			else if(this.type.equals(UploadType.PUT)){
				HttpPut put = new HttpPut(this.curlURL);
				put.setEntity(strEntity);
				req = put;
			
			}
			req.setHeader("Content-Length", String.valueOf(strEntity.getContentLength()));
			req.setHeader("Accept", "text/html");
				HttpParams basicParams = new BasicHttpParams();
				for(String key: this.props.keySet()){
					basicParams.setParameter(key, props.get(key));
				}
				req.setParams(basicParams);
			
			req.setHeader("Content-type", "text/plain");
			req.setHeader("verbose", "true");
			Header header = null;
			UsernamePasswordCredentials cred = null;
			if(this.authType.equals(AuthType.BASIC)){
				cred = new UsernamePasswordCredentials(user, pwd);
				header = new BasicScheme().authenticate(cred, req);
				req.addHeader(header);
			}
			else if(this.authType.equals(AuthType.DIGEST)){
				cred = new UsernamePasswordCredentials(user, pwd);
				DigestScheme digest = new DigestScheme();
				digest.overrideParamter("nonce", "123456789");
				digest.overrideParamter("realm", this.authType.name().toLowerCase()); 
				header = digest.authenticate(cred, req);
				req.addHeader(header);
			}
			DefaultHttpClient client = new DefaultHttpClient();
	 		if(!this.authType.equals(AuthType.NONE)){
	 			CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
	 			credentialsProvider.setCredentials(new AuthScope(url.getHost(), url.getPort(), this.authType.name().toLowerCase()),cred);
	 			client.getCredentialsProvider().setCredentials(new AuthScope(url.getHost(), url.getPort(), this.authType.name().toLowerCase()), cred);

//	 					HttpClientBuilder.create().setDefaultCredentialsProvider(credentialsProvider).build();
	 		}
	       
			HttpResponse res = client.execute(req);
			this.log.info(res.getStatusLine().toString());
			
		} catch (IOException | AuthenticationException e) {
			LogHandler.writeStackTrace(log, e, Level.SEVERE);
			return false;
		}
		return true;
	}