HttpListener for .NET Core and UWP


I have a small project that I hope that some finds useful.

It all started when I wanted to build an app for Windows IoT that acts like a Web server, but neither .NET Core nor Windows Runtime API has a HttpListener API.

So I created my own HttpListener based on TcpListener/TcpClient on .NET Core, and StreamSocketListener/StreamSocket on UWP.

I did this mainly for fun and learning. Now I hope that someone finds it useful and also inspiring.

Because I have been writing this from scratch, the API has been redesigned to modern, and it is not fully compatible with the one found in the full framework. My aim was to match the concepts with those in the more modern HttpClient API.

In its current state its not complete as it has been kind of quick and dirty. I wanted primarily just to handle simple requests and send simple responses - like with REST. So there are a lot of missing features from the HTTP Protocol, that I might be implementing myself someday.

Contributions are of course welcome.

The code is on GitHub:

.NET Foundation Website | Blog | Projects | Code of Conduct