Skip to content

Instantly share code, notes, and snippets.

@Ph47
Created December 19, 2014 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ph47/a972ca5a7dbbe5477cd4 to your computer and use it in GitHub Desktop.
Save Ph47/a972ca5a7dbbe5477cd4 to your computer and use it in GitHub Desktop.
Russian language query parse
using Microsoft.Owin.Hosting;
using Owin;
using System;
using System.Threading.Tasks;
using AppFunc = System.Func<System.Collections.Generic.IDictionary<string, object>, System.Threading.Tasks.Task>;
namespace Playground1
{
class Program
{
static void Main(string[] args)
{
using (WebApp.Start<Startup>("http://localhost:12345"))
{
Console.ReadLine();
}
}
}
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.Use(new Func<AppFunc, AppFunc>(ignoreNext => (env =>
{
Console.WriteLine(Uri.UnescapeDataString(env["owin.RequestQueryString"] as string));
return Task.FromResult(0);
})));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment