A relatively lightweight and embeddable HTTP server for .NET. SpaceWizards.HttpListener
is a maintained, updated, and unprofessionally butchered fork of the managed implementation of System.Net.HttpListener
straight out of https://github.com/dotnet/runtime. This means:
- Will always use the fully managed implementation of
HttpListener
. On Windows,System.Net.HttpListener
uses a different backend than Mac/Linux, namely the originalhttp.sys
backend. This functions very differently in behavior and bugs, which is unsuitable for cross-platform apps. Furthermore, binding something like0.0.0.0:1212
with it requires admin even if a plain TCP socket would be fine otherwise. - Bugfixes over the .NET Runtime implementation, which is basically unmaintained short of being kept around for compatibility. The original Mono implementation Mac/Linux
HttpListener
uses is quite buggy. - You may expect some more modern innovations and maybe breaking changes. We're primarily maintaining this for RobustToolbox so there you go.
See RELEASE-NOTES.md.
Literally any of the tutorials for System.Net.HttpListener
will probably do. There are also our usages in Robust: