Пример #1
0
        public static string VAR21(string VAR55, string VAR56)
        {
            byte[] VAR57;
            if (VAR55 != null)
            {
                VAR57 = VAR16.VAR28(VAR9, Encoding.ASCII.GetBytes(VAR55));
            }
            else
            {
                VAR57 = new byte[0];
            }
            string         VAR58 = String.Format("{0}/{1}/", VAR7, VAR37(0));
            HttpWebRequest VAR59 = (HttpWebRequest)WebRequest.Create(VAR58);

            VAR59.Method            = "POST";
            VAR59.UserAgent         = VAR11;
            VAR59.Timeout           = 10000;
            VAR59.Proxy.Credentials = CredentialCache.DefaultNetworkCredentials;
            Stream       VAR60 = null;
            StreamReader VAR61 = null;
            string       VAR62;
            string       VAR63 = "";

            if (VAR57.Length > 0)
            {
                VAR63 = Convert.ToBase64String(VAR57);
            }
            VAR2 VAR64 = new VAR2 {
                UUID = VAR56, ID = VAR8, Data = VAR63
            };
            var VAR65 = new JavaScriptSerializer();
            var VAR66 = VAR65.Serialize(VAR64).ToString();

            VAR59.ContentType = "application/json";
            try {
                VAR60 = VAR59.GetRequestStream();
                VAR60.Write(Encoding.ASCII.GetBytes(VAR66), 0, VAR66.Length);
            } finally {
                if (VAR60 != null)
                {
                    VAR60.Dispose();
                }
            }
            try {
                VAR60 = VAR59.GetResponse().GetResponseStream();
                VAR61 = new StreamReader(VAR60);
                VAR62 = VAR61.ReadToEnd();
            } catch {
                VAR62 = "";
            }
            return(VAR62.ToString());
        }
Пример #2
0
 protected static string VAR25(string VAR31)
 {
     byte[] VAR32 = Convert.FromBase64String(VAR31);
     return(Encoding.ASCII.GetString(VAR16.VAR28(VAR9, VAR32)));
 }