Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
Visual C++
MFC
MFC Concepts
 Steps in a Typical HTTP Client Appl...

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
MFC Library Reference
Steps in a Typical HTTP Client Application

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.

Use CInternetSession::GetHttpConnection.

Returns a CHttpConnection object.

Open an HTTP request.

Use CHttpConnection::OpenRequest.

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.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker