public static void BuildSample(IAppBuilder app) { // add eventsource middleware app.RouteHeader("User-Agent", "userAgent"); // pass static member as delegate app.RouteGet(new WriteHeaderFunc(WriteUserAgent), "/", ""); }
public static void BuildSample(IAppBuilder app) { // extract user agent header app.RouteHeader("User-Agent", "userAgent"); app.Run(ctx => WriteUserAgent(ctx)); }