PrefetchOptions.Builder


@ExperimentalPrefetch
public final class PrefetchOptions.Builder


Builder class for PrefetchOptions

Summary

Public constructors

Creates an empty PrefetchOptions.Builder object.

Public methods

@NonNull PrefetchOptions

Combines all the options that have been into a PrefetchOptions object.

@NonNull PrefetchOptions.Builder
setRequiresAnonymousIpWhenCrossOrigin(
    boolean requiresAnonymousIpWhenCrossOrigin
)

Set true to anonymize IP address of the prefetch request when it is cross-origin.

@NonNull PrefetchOptions.Builder
setSourceOrigin(@NonNull Uri sourceOrigin)

The origin that prefetch is requested from.

Public constructors

Builder

Added in 1.9.0-alpha01
public Builder()

Creates an empty PrefetchOptions.Builder object.

Public methods

build

Added in 1.9.0-alpha01
public @NonNull PrefetchOptions build()

Combines all the options that have been into a PrefetchOptions object.

setRequiresAnonymousIpWhenCrossOrigin

Added in 1.9.0-alpha01
public @NonNull PrefetchOptions.Builder setRequiresAnonymousIpWhenCrossOrigin(
    boolean requiresAnonymousIpWhenCrossOrigin
)

Set true to anonymize IP address of the prefetch request when it is cross-origin.

setSourceOrigin

Added in 1.9.0-alpha01
public @NonNull PrefetchOptions.Builder setSourceOrigin(@NonNull Uri sourceOrigin)

The origin that prefetch is requested from.