Beispiel #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());
        }
Beispiel #2
0
 public string ping(JsonpRequestModel request)
 {
     return(new ServiceController().Jsonp(request));
 }
Beispiel #3
0
 public string ping(JsonpRequestModel request)
 {
     return new ServiceController().Jsonp(request);
 }
Beispiel #4
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();
        }