Example #1
0
        public void OpenSDK_HttpSendWithWaitTest()
        {
            IntPtr iMessage;
            int    iLength;
            string jsonStr       = BuildParams("token");
            string strApiUrl     = "https://open.ys7.com/api/method";
            string strUrl2       = "https://open.ys7.com/api/lapp/token/get";
            string strParrameter = "appKey=1acd8ddc451f48a4b8b4666716e8f9ce&appSecret=518335cd3421f16a4b4e88164225c432";
            int    aaa           = SDK_EzvizSDK.OpenSDK_HttpSendWithWait(strUrl2, strParrameter, "", out iMessage, out iLength);
            //int aaa = SDK_EzvizSDK.OpenSDK_HttpSendWithWait(strApiUrl, jsonStr, "", out iMessage, out iLength);
            string returnstr = Marshal.PtrToStringAnsi(iMessage, iLength);

            Assert.AreEqual(1, returnstr);
        }