code: public static void post(URL url, String params) throws IOException {
          URLConnection conn = url.openConnection();
          if (conn instanceof HttpURLConnection) {
              ((HttpURLConnection) conn).setRequestMethod("POST");
              conn.setRequestProperty("Content-Type" , "application/json");
          }
          OutputStreamWriter writer = null;
          try {
              conn.setDoOutput(true);
              writer = new OutputStreamWriter(conn.getOutputStream(),
                      Charset.forName("UTF-8"));
              // write parameters
              writer.write(params);
              writer.flush();
          } finally {
              if (writer != null) {
                  writer.close();
              }
          }
      }
docs: Executes the given request as a HTTP POST action.
  
  @param url
  the url
  @param params
  the parameter
  @return the response as a String.
  @throws IOException
  if the server cannot be reached