Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 32. Data Services > HTTP CLIENT APPLICATION

32.3. HTTP CLIENT APPLICATION

The client application can be a simple application to just send HTTP requests to the service and receive AtomPub or JSON responses. The first client application example is a WPF application that makes use of the HttpWebRequest class from the System.Net namespace.

Figure 32-2 shows the UI from the Visual Studio Designer. A TextBox named textUrl is used to enter the HTTP request with a default value of http://localhost:9000/Samples/Menus. The read-only TextBox named textReturn receives the answer from the service. You can also see a CheckBox checkJSON, where the response can be requested in the JSON format. The Button with the content Call Data Service has the Click event associated to the OnRequest() method.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint