| BOOL WINAPI HttpDeleteHeaders( |
| |
HCLIENT hClient, |
|
| |
UINT nHeaderType |
|
| ); |
Delete all of the response or request headers for the current
session.
Parameters
- hClient
- Handle to the client session.
- nHeaderType
- Specifies the type of header to delete. It may be one of the
following values:
| Value |
Description |
| HTTP_HEADERS_REQUEST |
Delete all of the request headers that have been set for the
next request sent to the server. This will clear all of the
header values that were set using the HttpSetRequestHeader
function. |
| HTTP_HEADERS_RESPONSE |
Delete all of the headers that were set in response to the
previous request. A call to the HttpGetResponseHeader
function to obtain a specific header value will fail after this
function returns. |
Return Value
If the function succeeds, the return value is non-zero. If the function
fails, the return value is zero. To get extended error information, call
HttpGetLastError.
Remarks
The HttpDeleteHeaders function will release the memory
allocated for the request or response headers for the current session.
This function is typically used to clear all of the current request
headers so that the application may create a new set of headers when a
persistent connection is being used. The memory allocated for the
request and response headers is normally released when the session
handle is closed by calling the HttpDisconnect function.
Whenever a request for a resource is sent to the server, the response
headers from the previous request are automatically cleared. It is not
necessary for an application to call the HttpDeleteHeaders
function to delete the response headers prior to each request.
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: cshtpv12.lib
See Also
|