PrefetchOptions.Builder


@ExperimentalPrefetch
class PrefetchOptions.Builder


Builder class for PrefetchOptions

Summary

Public constructors

Creates an empty PrefetchOptions.Builder object.

Public functions

PrefetchOptions

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

PrefetchOptions.Builder
setRequiresAnonymousIpWhenCrossOrigin(
    requiresAnonymousIpWhenCrossOrigin: Boolean
)

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

PrefetchOptions.Builder
setSourceOrigin(sourceOrigin: Uri)

The origin that prefetch is requested from.

Public constructors

Builder

Added in 1.9.0-alpha01
Builder()

Creates an empty PrefetchOptions.Builder object.

Public functions

build

Added in 1.9.0-alpha01
fun build(): PrefetchOptions

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

setRequiresAnonymousIpWhenCrossOrigin

Added in 1.9.0-alpha01
fun setRequiresAnonymousIpWhenCrossOrigin(
    requiresAnonymousIpWhenCrossOrigin: Boolean
): PrefetchOptions.Builder

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

setSourceOrigin

Added in 1.9.0-alpha01
fun setSourceOrigin(sourceOrigin: Uri): PrefetchOptions.Builder

The origin that prefetch is requested from.