IHttpNegotiate::OnResponse

Allows the client of a bind operation to examine the response headers, optionally, terminate the bind operation, and add HTTP headers to a request before resending the request.

HRESULT OnResponse(
  DWORD  dwResponseCode,  //HTTP response code received
  LPCWSTR  szResponseHeaders,
                          //Response headers from the HTTP server
  LPCWSTR  szRequestHeaders,  //HTTP headers provided by the bind 
                              //clients
  LPWSTR * pszAdditionalResquestHeaders
                          //Optional additional HTTP headers
);
 

Parameter

dwResponseCode
[in] HTTP response code returned in response to a previous HTTP request. See the HTTP specification for information about these codes.
szResponseHeaders
[in] Response headers from the HTTP server. See the HTTP specification for more information.
szRequestHeaders
[in] If dwResponseCode indicates an error, contains HTTP request headers that will be used when the request is sent again.
pszAdditionalRequestHeaders
[out] If dwResponseCode indicates an error, contains optional, additional headers to add before the request is sent again. If the specified header value conflicts with existing values in szRequestHeaders, then the new headers take precedence. If pszAdditionalRequestHeaders is set to NULL, no headers are added to the HTTP request.

Return Values

S_OK
The operation was successful. If the dwResponseCode indicates an error, any szAdditionalRequestHeaders are appended and the request is sent again.
E_INVALIDARG
The parameter is invalid.
E_ABORT
Terminate the HTTP transaction.

Remarks

The URL moniker calls this method when it has received a response to an HTTP request. If the dwResponseCode indicates a success, the client can examine the response headers and can optionally abort the bind operation. If the dwResponseCode indicates a failure, the client can add HTTP headers to the request before it is sent again.

Note that if multiple clients have registered on the bind context for a given bind operation, more than one of these clients can provide an IHttpNegotiate callback interface. Every client providing this callback receives notifications. Each one is given a chance to add HTTP headers or to abort the HTTP transaction. In such cases, the last client to receive callback notification is the client driving the download operation, and it will dictate the final decision.

QuickInfo

  Windows NT: Use version 5.0 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in urlmon.h.

See Also

IHttpNegotiate::BeginningTransaction