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

Making Web Requests

SimplePutRequest uses three classes from Microsoft’s System.Net namespace: WebRequest, HttpWebRequest, and HttpWebResponse:

  • WebRequest

    A factory class (a class that generates other classes) whose method WebRequest.Create(requestUriString) creates an object that represents a request for the protocol indicated by the argument requestUriString. It issues a DNS lookup to find out the Internet address of the domain name given in the requestUriString. Alternatively, it accepts URIs that directly contain Internet addresses instead of domain names.

  • HttpWebRequest

    A complete HTTP request with its headers and body.

  • HttpWebResponse

    A complete HTTP response with its headers and body.

These classes are implemented in the System.Http assembly, ...

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