O'Reilly logo

Getting Started with the Internet of Things by Cuno Pfister

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

Chapter 8. Sending HTTP Requests—The Efficient Way

While the HttpWebRequest and HttpWebResponse classes are relatively convenient to use, they gobble up a large part of the available Flash and RAM on a Netduino Plus. Because they are built on top of the so-called Socket API, it can make sense to use the Socket API directly instead. This is more work, but it can reduce the memory footprint of an application considerably.

Moreover, the main message of this book is that HTTP is not black magic and requires neither high-powered computers nor huge, complex web frameworks. Using the Socket API makes that obvious, because you see much more of what really goes on than if you use only higher-level APIs. For this reason, I will show an alternative to SimplePutRequest ...

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