Exemplo n.º 1
0
        public ApiResponse SesTokInfo()
        {
            var response = Ctx.Session.HttpGet($"{Ctx.Config.BaseURL}/api/webserver/SesTokInfo");

            if (response.Response.ContainsKey("SesInfo") && response.Response.ContainsKey("TokInfo"))
            {
                // setup context values
                Ctx.AddRequestVerificationToken(response.Response["TokInfo"] as string);
                Ctx.SessionId = (response.Response["SesInfo"] as string).Substring("SessionID=".Length);
                return(response);
            }
            else
            {
                throw new System.Exception("SesInfo and/or TokInfo missing in response");
            }
        }