title: Call to webservice in objective c
body: <p>I want equivalent method for objective C from JAVA code</p>
  
  <pre><code>public static void post(URL url, byte[] msg, String user, String pass) throws Exception
  {
      HttpURLConnection conn = (HttpURLConnection) url.openConnection();
      conn.setDoInput(true);
      conn.setDoOutput(true);
      conn.setInstanceFollowRedirects(false);
      conn.setUseCaches(false);
      conn.setRequestMethod("POST");
      conn.setRequestProperty("Content-Type", "text/xml");
      conn.setRequestProperty("Authorization", "Basic " + makeAuth(user,pass));
      //conn.setRequestProperty("Content-Length", msg.length + "");
      OutputStream out = conn.getOutputStream();
      out.write(msg);
      out.flush();
      System.out.println("\n*** POST results ***");
      InputStream in = conn.getInputStream();
      printResults(in);
      try {out.close();} catch (Exception whocares) {}
      try {in.close();} catch (Exception whocares) {}
  }
  </code></pre>
  
  <p>Here is called the web service where uri is URL for webservice.
  user and pass is username and password.</p>
  
  <p>Can any one know how to call the same thing in objective c.</p>