Class FetchOptions.Builder (2.0.0)

public static final class FetchOptions.Builder

Contains static creation methods for FetchOptions.

Inheritance

java.lang.Object > FetchOptions.Builder

Static Methods

allowTruncate()

public static FetchOptions allowTruncate()

Create a FetchOptions that allows truncation of the response. Shorthand for FetchOptions.withDefaults().allowTruncate();. Please read the FetchOptions class javadoc for an explanation of how response truncating works.

Returns
TypeDescription
FetchOptions

The newly created FetchOptions instance.

disallowTruncate()

public static FetchOptions disallowTruncate()

Create a FetchOptions that disallows truncation of the response. Shorthand for FetchOptions.withDefaults().disallowTruncate();. Please read the FetchOptions class javadoc for an explanation of how esponse truncating works.

Returns
TypeDescription
FetchOptions

The newly created FetchOptions instance.

doNotFollowRedirects()

public static FetchOptions doNotFollowRedirects()

Create a FetchOptions that does not follow redirects. Shorthand for FetchOptions.withDefaults().doNotFollowRedirects();. Please read the FetchOptions class javadoc for an explanation of how redirection following works.

Returns
TypeDescription
FetchOptions

The newly created FetchOptions instance.

doNotValidateCertificate()

public static FetchOptions doNotValidateCertificate()

Create a FetchOptions that does not perform SSL certificate validation.

Shorthand for FetchOptions.withDefaults().doNotValidateCertificate();. Please read the FetchOptions class javadoc for an explanation of how certificate validation works.

Returns
TypeDescription
FetchOptions

The newly created FetchOptions instance.

followRedirects()

public static FetchOptions followRedirects()

Create a FetchOptions that follows redirects. Shorthand for FetchOptions.withDefaults().followRedirects();. Please read the FetchOptions class javadoc for an explanation of how redirection following works.

Returns
TypeDescription
FetchOptions

The newly created FetchOptions instance.

validateCertificate()

public static FetchOptions validateCertificate()

Create a FetchOptions that performs SSL certificate validation.

Shorthand for FetchOptions.withDefaults().validateCertificate();. Please read the FetchOptions class javadoc for an explanation of how certificate validation works.

Returns
TypeDescription
FetchOptions

The newly created FetchOptions instance.

withDeadline(double deadline)

public static FetchOptions withDeadline(double deadline)

Create a FetchOptions with the specified deadline. Shorthand for FetchOptions.withDefaults().setDeadline(deadline);.

Parameter
NameDescription
deadlinedouble
Returns
TypeDescription
FetchOptions

The newly created FetchOptions instance.

withDefaults()

public static FetchOptions withDefaults()
Returns
TypeDescription
FetchOptions