Anteckning
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Occurs when a client sends an HTTP request that the server redirects to a new URL.
Syntax
HRESULT OnRedirect(
[in, optional] IXMLHTTPRequest2 *pXHR,
[in] const WCHAR *pwszRedirectUrl
);
Parameters
[in, optional] pXHR
The HTTP request object being redirected.
[in] pwszRedirectUrl
The new URL for the HTTP request.
Return value
Returns S_OK on success.
Remarks
If the request redirection is not permitted, you can call the Abort method on the pXHR object.
XMLHTTPRequest2 imposes a maximum of 100 re-directions on any request. Any re-directions above that limit generate an OnError event. Applications have no access to the headers for re-directions.
Once the final redirection has completed and the final URL has been reached, the application receives an OnHeadersAvailable callback.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows 8 [desktop apps | UWP apps],MSXML 6.0 and later |
| Minimum supported server | Windows Server 2012 [desktop apps | UWP apps] |
| Target Platform | Windows |
| Header | msxml6.h |