Esempio n. 1
0
        public string Jsonp(JsonpRequestModel model)
        {
            var responseModel = new JsonpResponseModel();

            var pageRequest = ProcessEvent(model.SiteId, new Uri(model.Url), model.RequestId, TimeSpan.FromSeconds(model.Duration), model.Referer);

            if (model.JsonAction == "init")
            {
                responseModel.RequestId = pageRequest.Id;
                responseModel.SessionId = pageRequest.SessionIdentifier;
            }

            responseModel.Delay    = config.CoreDelay;
            responseModel.Callback = model.Callback;

            Response.ContentType = "text/javascript";

            return(responseModel.ToString());
        }
Esempio n. 2
0
        public string Jsonp(JsonpRequestModel model)
        {
            var responseModel = new JsonpResponseModel();

            var pageRequest = ProcessEvent(model.SiteId, new Uri(model.Url), model.RequestId, TimeSpan.FromSeconds(model.Duration), model.Referer);

            if (model.JsonAction == "init")
            {
                responseModel.RequestId = pageRequest.Id;
                responseModel.SessionId = pageRequest.SessionIdentifier;
            }

            responseModel.Delay = config.CoreDelay;
            responseModel.Callback = model.Callback;

            Response.ContentType = "text/javascript";

            return responseModel.ToString();
        }