Class RedirectHandlerOption
java.lang.Object
com.microsoft.kiota.http.middleware.options.RedirectHandlerOption
- All Implemented Interfaces:
com.microsoft.kiota.RequestOption
Options to be passed to the redirect middleware.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default maximum number of redirects to followstatic final IShouldRedirectDefault redirect evaluation, always follow redirect information.static final intThe absolute maximum number of redirects that can be followed -
Constructor Summary
ConstructorsConstructorDescriptionCreate default instance of redirect options, with default values of max redirects and should redirectRedirectHandlerOption(int maxRedirects, IShouldRedirect shouldRedirect) Create an instance with provided values -
Method Summary
-
Field Details
-
DEFAULT_MAX_REDIRECTS
public static final int DEFAULT_MAX_REDIRECTSThe default maximum number of redirects to follow- See Also:
-
MAX_REDIRECTS
public static final int MAX_REDIRECTSThe absolute maximum number of redirects that can be followed- See Also:
-
DEFAULT_SHOULD_REDIRECT
Default redirect evaluation, always follow redirect information.
-
-
Constructor Details
-
RedirectHandlerOption
public RedirectHandlerOption()Create default instance of redirect options, with default values of max redirects and should redirect -
RedirectHandlerOption
Create an instance with provided values- Parameters:
maxRedirects- Max redirects to occurshouldRedirect- Should redirect callback called before every redirect
-
-
Method Details
-
maxRedirects
public int maxRedirects()Gets the maximum number of redirects to follow.- Returns:
- max redirects
-
shouldRedirect
Gets the callback evaluating whether a redirect should be followed.- Returns:
- should redirect
-
getType
- Specified by:
getTypein interfacecom.microsoft.kiota.RequestOption
-