Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The following table shows the steps you might perform in a typical HTTP client application:
Your goal |
Actions you take |
Effects |
---|---|---|
Begin an HTTP session. |
Create a CInternetSession object. |
Initializes WinInet and connects to server. |
Connect to an HTTP server. |
Returns a CHttpConnection object. |
|
Open an HTTP request. |
Returns a CHttpFile object. |
|
Send an HTTP request. |
Use CHttpFile::AddRequestHeaders and CHttpFile::SendRequest. |
Finds the file. Returns FALSE if the file is not found. |
Read from the file. |
Use CHttpFile. |
Reads the specified number of bytes using a buffer you supply. |
Handle exceptions. |
Use the CInternetException class. |
Handles all common Internet exception types. |
End the HTTP session. |
Dispose of the CInternetSession object. |
Automatically cleans up open file handles and connections. |
See Also
Concepts
Win32 Internet Extensions (WinInet)
Prerequisites for Internet Client Classes
Writing an Internet Client Application Using MFC WinInet Classes