FetchOptions

Learn how to configure a content fetch.

This immutable class configures a call to fetchContent.

Start from defaults and chain the with* methods to build the options. Each method returns a new instance, leaving the original unchanged.

Croct's mascot winking
Looking for something specific?

Use the search bar at the top of the page or press / to quickly search through the documentation.

Use the summary below to quickly jump to a specific topic:

PageDescription
defaultsLearn how to create the default fetch options.
withPreferredLocaleLearn how to set the preferred locale for the content.
getPreferredLocaleLearn how to get the preferred locale for the content.
withStaticContentLearn how to fetch default content.
isStaticContentLearn how to check whether default content is requested.
withSchemaLearn how to include the content schema in the response metadata.
includesSchemaLearn how to check whether the content schema is included.
withAttributesLearn how to set the context attributes for the content.
withAttributeLearn how to add a context attribute to the content.
getAttributesLearn how to get the context attributes for the content.
withFallbackLearn how to set a fallback for the content.
hasFallbackLearn how to check whether a fallback was set.
getFallbackLearn how to get the fallback value for the content.