This documentation is archived and is not being maintained.

CAtlHttpClientT::GetHeaderValue 

Call this method to retrieve HTTP message header values.


bool GetHeaderValue(
   LPCTSTR szName,
   LPTSTR szBuffer,
   DWORD* pdwLen 
) const throw( );
bool GetHeaderValue(
   LPCTSTR szName,
   CString& strValue 
) const throw( );

Parameters

szName

A string containing the name of the header key, such as "Content-Type", and "Content-Length".

szBuffer

A buffer where the header value is to be stored.

pdwLen

The length of the buffer.

strValue

A CString reference where the header value is to be stored.

Returns true if the header key is present in the current response, and the header value is successfully stored, otherwise false.

The GetHeaderValue method is useful for retrieving the values of known header keys. The entire response header body can be retrieved using the GetRawResponseHeader method.

Show: