Partager via


CHttpFile Class

Provides the functionality to request and read files on an HTTP server.

class CHttpFile : public CInternetFile

Members

Protected Constructors

Name

Description

CHttpFile::CHttpFile

Creates a CHttpFile object.

Public Methods

Name

Description

CHttpFile::AddRequestHeaders

Adds headers to the request sent to an HTTP server.

CHttpFile::EndRequest

Ends a request sent to an HTTP server with the SendRequestEx member function.

CHttpFile::GetFileURL

Gets the URL for the specified file.

CHttpFile::GetObject

Gets the target object of the verb in a request to an HTTP server.

CHttpFile::GetVerb

Gets the verb that was used in a request to an HTTP server.

CHttpFile::QueryInfo

Returns the response or request headers from the HTTP server.

CHttpFile::QueryInfoStatusCode

Retrieves the status code associated with an HTTP request and places it in the supplied dwStatusCode parameter.

CHttpFile::SendRequest

Sends a request to an HTTP server.

CHttpFile::SendRequestEx

Sends a request to an HTTP server using the Write or WriteString methods of CInternetFile.

Remarks

If your Internet session reads data from an HTTP server, you must create an instance of CHttpFile.

To learn more about how CHttpFile works with the other MFC Internet classes, see the article Internet Programming with WinInet.

Inheritance Hierarchy

CObject

CFile

CStdioFile

CInternetFile

CHttpFile

Requirements

Header: afxinet.h

See Also

Reference

CInternetFile Class

Hierarchy Chart

CInternetFile Class

CGopherFile Class

CHttpConnection Class