CWebView::ClearHeaders Method  
 
BOOL ClearHeaders(
  DWORD dwHeaderType  
);

The ClearHeaders method clears the current request and/or response headers for the current session.

Parameters

dwHeaderType
An unsigned integer value which may be one of the following values.
Value Description
WEBVIEW_HEADERS_REQUEST The custom request headers for the current session should be deleted. These are the HTTP headers which can be set or changed prior to the browser navigating to a new page. The standard request headers included with every request will continue to be sent.
WEBVIEW_HEADERS_RESPONSE The response headers for the current session should be deleted. These are the headers which are returned by the server after navigation has completed. These headers are automatically deleted with each new navigation, making this option unnecessary in most cases.

Return Value

If the method succeeds, the return value is non-zero. If the method fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

This method can be used to delete the custom request headers set with SetHeader or clear the response headers returned by the previous navigation.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: cshtmv12.lib

See Also