com.google.appengine.api.urlfetch
Class FetchOptions.Builder
- java.lang.Object
-
- com.google.appengine.api.urlfetch.FetchOptions.Builder
-
- Enclosing class:
- FetchOptions
public static final class FetchOptions.Builder extends java.lang.Object
Contains static creation methods forFetchOptions
.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static FetchOptions
allowTruncate()
Create aFetchOptions
that allows truncation of the response.static FetchOptions
disallowTruncate()
Create aFetchOptions
that disallows truncation of the response.static FetchOptions
doNotFollowRedirects()
Create aFetchOptions
that does not follow redirects.static FetchOptions
doNotValidateCertificate()
Create aFetchOptions
that does not perform SSL certificate validation.static FetchOptions
followRedirects()
Create aFetchOptions
that follows redirects.static FetchOptions
validateCertificate()
Create aFetchOptions
that performs SSL certificate validation.static FetchOptions
withDeadline(double deadline)
Create aFetchOptions
with the specified deadline.static FetchOptions
withDefaults()
Helper method for creating aFetchOptions
instance with default values.
-
-
-
Method Detail
-
allowTruncate
public static FetchOptions allowTruncate()
Create aFetchOptions
that allows truncation of the response. Shorthand forFetchOptions.withDefaults().allowTruncate();
. Please read theFetchOptions
class javadoc for an explanation of how response truncating works.- Returns:
- The newly created FetchOptions instance.
-
disallowTruncate
public static FetchOptions disallowTruncate()
Create aFetchOptions
that disallows truncation of the response. Shorthand forFetchOptions.withDefaults().disallowTruncate();
. Please read theFetchOptions
class javadoc for an explanation of how esponse truncating works.- Returns:
- The newly created FetchOptions instance.
-
followRedirects
public static FetchOptions followRedirects()
Create aFetchOptions
that follows redirects. Shorthand forFetchOptions.withDefaults().followRedirects();
. Please read theFetchOptions
class javadoc for an explanation of how redirection following works.- Returns:
- The newly created FetchOptions instance.
-
doNotFollowRedirects
public static FetchOptions doNotFollowRedirects()
Create aFetchOptions
that does not follow redirects. Shorthand forFetchOptions.withDefaults().doNotFollowRedirects();
. Please read theFetchOptions
class javadoc for an explanation of how redirection following works.- Returns:
- The newly created FetchOptions instance.
-
validateCertificate
public static FetchOptions validateCertificate()
Create aFetchOptions
that performs SSL certificate validation. Shorthand forFetchOptions.withDefaults().validateCertificate();
. Please read theFetchOptions
class javadoc for an explanation of how certificate validation works.- Returns:
- The newly created FetchOptions instance.
-
doNotValidateCertificate
public static FetchOptions doNotValidateCertificate()
Create aFetchOptions
that does not perform SSL certificate validation. Shorthand forFetchOptions.withDefaults().doNotValidateCertificate();
. Please read theFetchOptions
class javadoc for an explanation of how certificate validation works.- Returns:
- The newly created FetchOptions instance.
-
withDeadline
public static FetchOptions withDeadline(double deadline)
Create aFetchOptions
with the specified deadline. Shorthand forFetchOptions.withDefaults().setDeadline(deadline);
.- Returns:
- The newly created FetchOptions instance.
-
withDefaults
public static FetchOptions withDefaults()
Helper method for creating aFetchOptions
instance with default values.
-
-