public void Configuration(IAppBuilder app) { app.UseHandler(async(request, response) => { response.ContentType = "text/html"; await response.WriteAsync("OWIN Hello World!!"); }); }
public void Configuration(IAppBuilder app) { app.UseHandler(async (request, response) => { response.ContentType = "text/html"; await response.WriteAsync("OWIN Hello World!!"); }); }
public void Configuration(IAppBuilder builder) { builder.UseHandler((request, response) => { // write headers first! response.StatusCode = 200; response.Write("Sup"); }); }
public void Configuration(IAppBuilder appBuilder) { appBuilder.UseHandler((request, response) => { if (StatusCode != null) { response.StatusCode = this.StatusCode.Value; } if (ReasonPhrase != null) { response.ReasonPhrase = this.ReasonPhrase; } if (Body != null) { response.Write(this.Body); } }); }
public void Configuration(IAppBuilder app) { var logger = app.CreateLogger(GetType()); app.SetDataProtectionProvider(new SharedSecretDataProtectionProvider( "af98j3pf98ja3fdopa32hr !!!! DO NOT USE THIS STRING IN YOUR APP !!!!", "AES", "HMACSHA256")); // example of a filter - writeline each request app.UseFilter(req => logger.WriteInformation(string.Format( "{0} {1}{2} {3}", req.Method, req.PathBase, req.Path, req.QueryString))); // example of a handler - all paths reply Hello, Owin! app.UseHandler(async (req, res) => { res.ContentType = "text/plain"; await res.WriteAsync("Hello, OWIN!"); }); }
public void Configuration(IAppBuilder app) { var logger = app.CreateLogger(GetType()); app.SetDataProtectionProvider(new SharedSecretDataProtectionProvider( "af98j3pf98ja3fdopa32hr !!!! DO NOT USE THIS STRING IN YOUR APP !!!!", "AES", "HMACSHA256")); // example of a filter - writeline each request app.UseFilter(req => logger.WriteInformation(string.Format( "{0} {1}{2} {3}", req.Method, req.PathBase, req.Path, req.QueryString))); // example of a handler - all paths reply Hello, Owin! app.UseHandler(async(req, res) => { res.ContentType = "text/plain"; await res.WriteAsync("Hello, OWIN!"); }); }
public void Configuration(IAppBuilder app) { app.UseHandler((req, res) => res.WriteAsync("Hello")); }
public void Configuration(IAppBuilder builder) { builder.UseHandler((request, response) => response.Write(_myService.GetFoo())); }
public void Configuration1(IAppBuilder builder) { builder.UseHandler((request, response) => response.Write("Sup")); }
public void Configuration(IAppBuilder builder) { builder.UseHandler((request, response) => response.StatusCode = 404); }