servicePrint.println(request);
if (request != null) servicePrint.println(request);
  public static InputStream sendRequest(String urlString, String request)    throws MalformedURLException, IOException  {    // open connection    URL url = new URL(urlString);    URLConnection uc = url.openConnection();    ((HttpURLConnection)uc).setRequestMethod("PUT");    uc.setDoInput(true);    uc.setDoOutput(true);    OutputStream os = uc.getOutputStream();    PrintStream servicePrint = new PrintStream(os);    // send request    servicePrint.println(request);    return uc.getInputStream();  }