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(
  void *state,
  const WS_STRING *originalUrl,
  const WS_STRING *newUrl
)
{...}

Parameters

state

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

originalUrl

The original endpoint URL that the message was sent to.

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

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