O'Reilly logo

Mastering Internet of Things by Peter Waher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating an HTTP server

The HTTP library defines a HttpServer class that we will use to set up our server. Creating an HTTP server is easy:

         privateHttpServerhttpServer = null; 
         ... 
         this.httpServer = new HttpServer();
Add a reference to a sniffer in the constructor, such as the LogSniffer available in the GitHub project, to view communication passing through the server. You can also specify port numbers you want to use when hosting the web server. If you don't specify port numbers, the default HTTP port will be used. 
The UWP version of the HTTP library does not support server-side encryption at the current time. The reason is that the underlying UWP framework does not support it. When .NET Standard 2.0 is released and available for Raspberry, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required