Ejemplo n.º 1
0
 public static void performLogin(String user, String password, handleJSON ascResult)
 {
     getReply(API.getAuthenticationUrl(user, password), ascResult);
 }
Ejemplo n.º 2
0
        public static void getReply(String url, handleJSON ascResult)
        {
            try {
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);

                request.ContentType = "application/x-www-form-urlencoded";
                request.Method = "POST";
                request.CookieContainer = API.cContainer;

                // start the asynchronous operation
                request.BeginGetRequestStream(new AsyncCallback(GetRequestStreamCallback),
                                              new HttpWebRequestCallBack(request, ascResult));
            }
            catch
            {
                ascResult(null);
                return;
            }
        }