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 ...

Get Getting Started with the Internet of Things now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.