docs: private static String _put(nitro_service service, String request) throws Exception {
  		HttpURLConnection httpURLConnection;
  		StringBuilder responseStr = new StringBuilder();
  		try
  		{
  			String urlstr;
  			String ipaddress = service.get_ipaddress();
  			String version = service.get_version();
  			String protocol = service.get_protocol();
  			urlstr = protocol+"://" + ipaddress + "/nitro/" + version + "/config/";
  			URL url = new URL(urlstr);
  			httpURLConnection = (HttpURLConnection) url.openConnection();
  			httpURLConnection.setRequestMethod("PUT");
  			if (httpURLConnection instanceof HttpsURLConnection)
  			{
  				if (service.get_certvalidation()) {
  					SocketFactory sslSocketFactory = SSLSocketFactory.getDefault();
  					HttpsURLConnection secured = (HttpsURLConnection) httpURLConnection;
  					secured.setSSLSocketFactory((SSLSocketFactory)sslSocketFactory);	
  					if (!service.get_hostnameverification()) {
  						/*
  						 * override defualt hostNameverifier's verify method
  						 * with EmptyHostnameVerifier's verify method to ignore hostname verification check.
  						 */
  						secured.setHostnameVerifier(new EmptyHostnameVerifier());
  					}
  				} else {
  					SSLContext sslContext = SSLContext.getInstance("SSL");
  					//we are using an empty trust manager, because NetScaler currently presents
  					//a test certificate not issued by any signing authority, so we need to bypass
  					//the credentials check
  					sslContext.init(null, new TrustManager[]{new EmptyTrustManager()}, null);
  					SocketFactory sslSocketFactory = sslContext.getSocketFactory();
  					
  					HttpsURLConnection secured = (HttpsURLConnection) httpURLConnection;
  					secured.setSSLSocketFactory((SSLSocketFactory)sslSocketFactory);
  					if (!service.get_hostnameverification()) {
  						/*
  						 * overriding defualt hostNameverifier's verify method
  						 * with EmptyHostnameVerifier's verify method to bypass hostname check.
  						 */
  						secured.setHostnameVerifier(new EmptyHostnameVerifier());
  					}
  				}
  			}
  
  			httpURLConnection.setDoInput(true);
  			httpURLConnection.setDoOutput(true);
  			httpURLConnection.setUseCaches(false);
  			httpURLConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
  			
  			httpURLConnection.setDoOutput(true);
  			OutputStreamWriter ouput = new OutputStreamWriter(httpURLConnection.getOutputStream());
  			ouput.write(request);
  			ouput.flush();
  			ouput.close();
  
  			InputStream input;
  			try {
  				input = httpURLConnection.getInputStream();
  			}
  			catch (Exception e) {
  				input = httpURLConnection.getErrorStream();	
  			}
  			String contentEncoding = httpURLConnection.getContentEncoding();
  			//	get correct input stream for compressed data:
  			if (contentEncoding != null)
  			{
  				if(contentEncoding.equalsIgnoreCase("gzip"))
  					input = new GZIPInputStream(input); //reads 2 bytes to determine GZIP stream!
  				else if(contentEncoding.equalsIgnoreCase("deflate"))
  					input = new InflaterInputStream(input);
  			}
  
  			int numOfTotalBytesRead;
  			byte [] buffer = new byte[1024];
  			while ((numOfTotalBytesRead = input.read(buffer, 0, buffer.length)) != -1)
  			{
  				responseStr.append(new String(buffer, 0, numOfTotalBytesRead));
  			}
  
  			httpURLConnection.disconnect();
  			input.close();
  		}
  		catch (MalformedURLException mue)
  		{
  			throw mue;
  		}
  		catch (IOException ioe)
  		{
  			throw ioe;
  		}
  		catch(Exception e)
  		{
  			throw e;
  		}
  		
  		return responseStr.toString();
  	}