ATL SERVER COMES WITH a set of classes intended to facilitate development of HTTP client applications. A common example of when these classes are used is in a SOAP client. The default SOAP client class generated by sproxy.exe uses this set of classes for HTTP communications.
This chapter provides an overview of the features of the HTTP client. It also provides some code snippets (and analysis) for a few common scenarios in developing HTTP client applications. You can find a complete reference for the classes and methods we discuss in this chapter in Visual Studio .NET s MSDN documentation ( ms-help://MS.VSCC/MS.MSDNVS/vccore/html/vcconatlhttpclientoverview.htm ).
Note | All the code snippets presented in this chapter send HTTP requests to a virtual directory called HTTPClient on the local machine, and build and deploy the ClientParams sample application. For compiling and running the sample code, please create a folder called HTTPClient in the root directory of IIS on your machine. Usually, the IIS root folder is in %HOMEDRIVE%:\Inetpub\ wwwroot , where %HOMEDRIVE% is the drive where you ve installed Windows. Then, copy the content of the HTTPClient sample folder into this directory. If you don t have IIS installed on your machine, you ll need to modify the sample code to point to the server of your choice. Also, if accessing the IIS machine requires you to use an HTTP proxy server, we provide details on how to do this for an ATL Server application in the A Simple HTTP Client section. |
In the next section we discuss the classes involved in developing HTTP clients .