CallRedirectionUrlValidationCallback method
bool
CallRedirectionUrlValidationCallback(
- String redirectionUrl
)
Creates an HttpWebRequest instance and initializes it with the appropriate parameters,
based on the configuration of this service object.
The URL that the HttpWebRequest should target.
Calls the redirection URL validation callback.
The redirection URL.
Implementation
// IEwsHttpWebRequest PrepareHttpWebRequestForUrl(Uri url)
// {
// return this.PrepareHttpWebRequestForUrl(
// url,
// false, // acceptGzipEncoding
// false); // allowAutoRedirect
// }
/// <summary>
/// Calls the redirection URL validation callback.
/// </summary>
/// <param name="redirectionUrl">The redirection URL.</param>
/// <remarks>
/// If the redirection URL validation callback is null, use the default callback which
/// does not allow following any redirections.
/// </remarks>
/// <returns>True if redirection should be followed.</returns>
/* private */
bool CallRedirectionUrlValidationCallback(String redirectionUrl) {
AutodiscoverRedirectionUrlValidationCallback callback =
(this.RedirectionUrlValidationCallback == null)
? DefaultAutodiscoverRedirectionUrlValidationCallback
: this.RedirectionUrlValidationCallback!;
return callback(redirectionUrl);
}