private void Form1_Load(object sender, EventArgs e) { SetIE(); mHttpApiServer = new BeetleX.FastHttpApi.HttpApiServer(); mHttpApiServer.Register(typeof(Form1).Assembly); mHttpApiServer.Open(); }
static void Main(string[] args) { mApiServer = new BeetleX.FastHttpApi.HttpApiServer(); mApiServer.Register(typeof(Program).Assembly); mApiServer.Open(); Console.Write(mApiServer.BaseServer); Console.Read(); }
static void Main(string[] args) { mApiServer = new BeetleX.FastHttpApi.HttpApiServer(); mApiServer.Options.LogLevel = BeetleX.EventArgs.LogType.Debug; mApiServer.Options.LogToConsole = true; mApiServer.Register(typeof(Program).Assembly); mApiServer.Open(); Console.Write(mApiServer.BaseServer); Console.Read(); }
static void Main(string[] args) { mApiServer = new BeetleX.FastHttpApi.HttpApiServer(); mApiServer.Options.LogLevel = BeetleX.EventArgs.LogType.Debug; mApiServer.Options.LogToConsole = true; mApiServer.Options.SetDebug(); mApiServer.Register(typeof(Program).Assembly); mApiServer.Open(); //mApiServer.WebSocketReceive = (o, e) => //{ // Console.WriteLine(e.Frame.Body); // var freame = e.CreateFrame($"{DateTime.Now}" + e.Frame.Body.ToString()); // e.Response(freame); //}; //mApiServer.WebSocketConnect = (o, e) => { // //e.Request.Header // //e.Request.Cookies // e.Cancel = true; //}; Console.Write(mApiServer.BaseServer); Console.Read(); }