public interface RedirectStrategy
redirect strategy
used in RedirectPolicy
.Modifier and Type | Method and Description |
---|---|
HttpRequest |
createRedirectRequest(HttpResponse httpResponse)
Creates an
request for the redirect attempt. |
int |
getMaxAttempts()
Max number of redirect attempts to be made.
|
boolean |
shouldAttemptRedirect(HttpPipelineCallContext context,
HttpResponse httpResponse,
int tryCount,
Set<String> attemptedRedirectUrls)
Determines if the url should be redirected between each try.
|
int getMaxAttempts()
boolean shouldAttemptRedirect(HttpPipelineCallContext context, HttpResponse httpResponse, int tryCount, Set<String> attemptedRedirectUrls)
context
- the HTTP pipeline context
.httpResponse
- the HttpRequest
containing the redirect url present in the response headerstryCount
- redirect attempts so farattemptedRedirectUrls
- attempted redirect locations used so far.true
if the request should be redirected, false
otherwiseHttpRequest createRedirectRequest(HttpResponse httpResponse)
request
for the redirect attempt.httpResponse
- the HttpResponse
containing the redirect url present in the response headersHttpRequest
to redirect the incoming request.Copyright © 2021 Microsoft Corporation. All rights reserved.