Skip to content
forked from jlorek/flexHttpd

A lightweight http server for Windows IoT

Notifications You must be signed in to change notification settings

servucn/flexHttpd

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

flexHttpd

A lightweight http server for Windows IoT (and anything else).

PM> Install-Package FlexHttpd

Prepare

Open your Package.appxmanifest and make sure your application has Internet (Client & Server) and / or Private Networks (Client & Server) capabilities (depending on your needs).

Example

private FlexServer _httpd;

private void StartHttpd()
{
    _httpd = new FlexServer();

    _httpd.Get["/device/on"] = async (request) =>
    {
        // do whatever you need to do here
        // ...
        // await _magicDevice.TurnOn();
        // ...
        return new FlexResponse(FlexHttpStatus.Ok);
    };

    Task.Factory.StartNew(async () => await _httpd.Start(1024));
}

Enjoy! :)

About

A lightweight http server for Windows IoT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%