public static string GetEncWeb(string url, string action, string postData = "") { var u = $"{url}{action}"; var request = WebRequest.CreateHttp(u); request.Method = "POST"; request.ServicePoint.Expect100Continue = false; request.Accept = "*/*"; request.UserAgent = "UnityPlayer/5.6.6f2 (UnityWebRequest/1.0, libcurl/7.51.0-DEV)"; request.Headers.Add("X-Unity-Version", "5.6.6f2"); request.Headers.Add("Accept-Encoding", "identity"); request.Headers.Add("Content-Encoding", "identity"); if (postData != "") { request.ContentType = "application/octet-stream+jhotuhiahanoatuhinga+fakamunatanga"; var bytes = Encoding.UTF8.GetBytes(postData); var stream = request.GetRequestStream(); stream.Write(bytes, 0, bytes.Length); stream.Close(); } using (var response = request.GetResponse()) { using (var stream = response.GetResponseStream()) { MemoryStream ms = new MemoryStream(); stream.CopyTo(ms); var dec = ms.ToArray(); return(Encoding.UTF8.GetString(Runtime.AesDecrypt(Runtime.GetEncryptionApp(action), dec))); } } }