HttpCancelHttpRequest function (http.h)

The HttpCancelHttpRequest function cancels a specified request.

Syntax

HTTPAPI_LINKAGE ULONG HttpCancelHttpRequest(
  [in]           HANDLE          RequestQueueHandle,
  [in]           HTTP_REQUEST_ID RequestId,
  [in, optional] LPOVERLAPPED    Overlapped
);

Parameters

[in] RequestQueueHandle

A handle to the request queue from which the request came.

[in] RequestId

The ID of the request to be canceled.

[in, optional] Overlapped

For asynchronous calls, set pOverlapped to point to an OVERLAPPED structure; for synchronous calls, set it to NULL.

Return value

If the function succeeds, it returns NO_ERROR.

Remarks

When the HttpCancelHttpRequest function is used to cancel a request, the underlying transport connection used for the request will be closed.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header http.h
Library Httpapi.lib
DLL Httpapi.dll

See also

HTTP Server API Version 2.0 Functions

Processing Requests