WS_HTTP_REDIRECT_CALLBACK callback function (webservices.h)

Invoked when a message is about to be automatically redirected to another service utilizing HTTP auto redirect functionality as described in RFC2616. If the redirection should not be allowed, this callback should return S_FALSE or an error value. Otherwise the auto HTTP redirection will proceed.

Syntax

WS_HTTP_REDIRECT_CALLBACK WsHttpRedirectCallback;

HRESULT WsHttpRedirectCallback(
  [in] void *state,
  [in] const WS_STRING *originalUrl,
  [in] const WS_STRING *newUrl
)
{...}

Parameters

[in] state

The 'state' as specified as part of WS_HTTP_REDIRECT_CALLBACK_CONTEXT 'state' field.

[in] originalUrl

The original endpoint URL that the message was sent to.

[in] newUrl

The endpoint URL that the message is about to be forwarded to.

Return value

This callback function does not return a value.

Remarks

The parameters supplied during this callback are valid only for the duration of the callback.

The callback implementation should avoid lengthy computation or lengthy blocking calls so that it can return to the caller quickly.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header webservices.h