public void Handle(HttpContext context, HproseHttpMethods methods) { currentContext = context; try { string method = currentContext.Request.HttpMethod; if ((method == "GET") && getEnabled) { DoFunctionList(methods); } else if (method == "POST") { base.Handle(methods); } else { currentContext.Response.StatusCode = 405; } if (istream != null) { istream.Close(); } if (ostream != null) { ostream.Close(); } currentContext.Response.End(); } finally { istream = null; ostream = null; currentContext = null; } }
protected void Page_Load(object sender, EventArgs e) { Api_CategoryProvider category = new Api_CategoryProvider(); HproseHttpMethods methods = new HproseHttpMethods(); methods.AddInstanceMethods(category, "category"); Global.ExamService.Handle(methods); }
public void Handle(HttpContext context, HproseHttpMethods methods) { currentContext = context; try { SendHeader(context); string method = context.Request.HttpMethod; Stream ostream = GetOutputStream(context); if ((method == "GET") && getEnabled) { DoFunctionList(methods, context).WriteTo(ostream); } else if (method == "POST") { Handle(GetInputStream(context), methods, context).WriteTo(ostream); } else { context.Response.StatusCode = 403; } ostream.Close(); context.Response.Flush(); } finally { currentContext = null; } }
protected void Page_Load(object sender, EventArgs e) { Api_ProductProvider product = new Api_ProductProvider(); HproseHttpMethods methods = new HproseHttpMethods(); methods.AddInstanceMethods(product, "product"); Global.ExamService.Handle(methods); }
public void Handle(HttpContext context, HproseHttpMethods methods) { currentContext = context; try { string method = currentContext.Request.HttpMethod; if ((method == "GET") && getEnabled) { DoFunctionList(methods); } else if (method == "POST") { base.Handle(methods); } else { currentContext.Response.StatusCode = 405; } if (istream != null) istream.Close(); if (ostream != null) ostream.Close(); currentContext.Response.End(); } finally { istream = null; ostream = null; currentContext = null; } }