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.ObjectContains static creation methods forFetchOptions.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static FetchOptionsallowTruncate()Create aFetchOptionsthat allows truncation of the response.static FetchOptionsdisallowTruncate()Create aFetchOptionsthat disallows truncation of the response.static FetchOptionsdoNotFollowRedirects()Create aFetchOptionsthat does not follow redirects.static FetchOptionsdoNotValidateCertificate()Create aFetchOptionsthat does not perform SSL certificate validation.static FetchOptionsfollowRedirects()Create aFetchOptionsthat follows redirects.static FetchOptionsvalidateCertificate()Create aFetchOptionsthat performs SSL certificate validation.static FetchOptionswithDeadline(double deadline)Create aFetchOptionswith the specified deadline.static FetchOptionswithDefaults()Helper method for creating aFetchOptionsinstance with default values.
-
-
-
Method Detail
-
allowTruncate
public static FetchOptions allowTruncate()
Create aFetchOptionsthat allows truncation of the response. Shorthand forFetchOptions.withDefaults().allowTruncate();. Please read theFetchOptionsclass javadoc for an explanation of how response truncating works.- Returns:
- The newly created FetchOptions instance.
-
disallowTruncate
public static FetchOptions disallowTruncate()
Create aFetchOptionsthat disallows truncation of the response. Shorthand forFetchOptions.withDefaults().disallowTruncate();. Please read theFetchOptionsclass javadoc for an explanation of how esponse truncating works.- Returns:
- The newly created FetchOptions instance.
-
followRedirects
public static FetchOptions followRedirects()
Create aFetchOptionsthat follows redirects. Shorthand forFetchOptions.withDefaults().followRedirects();. Please read theFetchOptionsclass javadoc for an explanation of how redirection following works.- Returns:
- The newly created FetchOptions instance.
-
doNotFollowRedirects
public static FetchOptions doNotFollowRedirects()
Create aFetchOptionsthat does not follow redirects. Shorthand forFetchOptions.withDefaults().doNotFollowRedirects();. Please read theFetchOptionsclass javadoc for an explanation of how redirection following works.- Returns:
- The newly created FetchOptions instance.
-
validateCertificate
public static FetchOptions validateCertificate()
Create aFetchOptionsthat performs SSL certificate validation. Shorthand forFetchOptions.withDefaults().validateCertificate();. Please read theFetchOptionsclass javadoc for an explanation of how certificate validation works.- Returns:
- The newly created FetchOptions instance.
-
doNotValidateCertificate
public static FetchOptions doNotValidateCertificate()
Create aFetchOptionsthat does not perform SSL certificate validation. Shorthand forFetchOptions.withDefaults().doNotValidateCertificate();. Please read theFetchOptionsclass javadoc for an explanation of how certificate validation works.- Returns:
- The newly created FetchOptions instance.
-
withDeadline
public static FetchOptions withDeadline(double deadline)
Create aFetchOptionswith the specified deadline. Shorthand forFetchOptions.withDefaults().setDeadline(deadline);.- Returns:
- The newly created FetchOptions instance.
-
withDefaults
public static FetchOptions withDefaults()
Helper method for creating aFetchOptionsinstance with default values.
-
-