Skip to main content
ATL Server Library Reference 

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( );



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


A buffer where the header value is to be stored.


The length of the buffer.


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.