public class RedirectConfig extends Object implements Config
RestAssuredConfig
,
ClientPNames
Constructor and Description |
---|
RedirectConfig()
Create a new RedirectConfig instance with the following configuration by default:
followRedirects = true
allowCircularRedirects = false
rejectRelativeRedirect = false
maxRedirects = 100
|
RedirectConfig(boolean followRedirects,
boolean allowCircularRedirects,
boolean rejectRelativeRedirect,
int maxRedirects)
Create a new instance of a RedirectConfig with the supplied settings.
|
Modifier and Type | Method and Description |
---|---|
RedirectConfig |
allowCircularRedirects(boolean value)
Configure if REST Assured should allow circular redirects
|
boolean |
allowsCircularRedirects() |
RedirectConfig |
and()
The same RedirectConfig instance.
|
RedirectConfig |
followRedirects(boolean value)
Configure if REST Assured should follow redirects
|
boolean |
followsRedirects() |
boolean |
isUserConfigured() |
int |
maxRedirects() |
RedirectConfig |
maxRedirects(int value)
Configure the maximum number of redirects.
|
static RedirectConfig |
redirectConfig() |
RedirectConfig |
rejectRelativeRedirect(boolean value)
Configure if REST Assured should reject relative redirects
|
boolean |
rejectRelativeRedirects() |
public RedirectConfig()
public RedirectConfig(boolean followRedirects, boolean allowCircularRedirects, boolean rejectRelativeRedirect, int maxRedirects)
followRedirects
- Configure if REST Assured should follow redirectsallowCircularRedirects
- Configure if REST Assured should allow circular redirectsrejectRelativeRedirect
- Configure if REST Assured should reject relative redirectsmaxRedirects
- Configure the REST Assured maximum number of redirectpublic RedirectConfig followRedirects(boolean value)
value
- true
if it should follow redirects, false
otherwise.public RedirectConfig allowCircularRedirects(boolean value)
value
- true
if it should allow circular redirects, false
otherwise.public RedirectConfig rejectRelativeRedirect(boolean value)
value
- true
if it should reject relative redirects, false
otherwise.public RedirectConfig maxRedirects(int value)
value
- The maximum number of redirectspublic RedirectConfig and()
public boolean followsRedirects()
true
if configured to follow redirectspublic boolean allowsCircularRedirects()
true
if configured to allow circular redirectspublic boolean rejectRelativeRedirects()
true
if configured to reject relative redirectspublic int maxRedirects()
public static RedirectConfig redirectConfig()
public boolean isUserConfigured()
isUserConfigured
in interface Config
true
if this config instance has been explicitly configured by the user, false
if it has the default values.Copyright © 2010–2017. All rights reserved.