public bo() { _page = HttpContext.Current.Handler as tl_page; if (_page == null) { throw new Exception("pagina attiva non valida!"); } }
public json_request(tl_page page) { string json = String.Empty; page.Request.InputStream.Position = 0; using (var inputStream = new StreamReader(page.Request.InputStream)) { json = inputStream.ReadToEnd(); } if (string.IsNullOrEmpty(json)) { throw new Exception("nessuna richiesta da elaborare!"); } _jo = JObject.Parse(json); }
public static bool there_request(tl_page page) { return(page.Request.Headers["toyn-post"] != null); }