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.
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:
| Page | Description |
|---|---|
| defaults | Learn how to create the default fetch options. |
| withPreferredLocale | Learn how to set the preferred locale for the content. |
| getPreferredLocale | Learn how to get the preferred locale for the content. |
| withStaticContent | Learn how to fetch default content. |
| isStaticContent | Learn how to check whether default content is requested. |
| withSchema | Learn how to include the content schema in the response metadata. |
| includesSchema | Learn how to check whether the content schema is included. |
| withAttributes | Learn how to set the context attributes for the content. |
| withAttribute | Learn how to add a context attribute to the content. |
| getAttributes | Learn how to get the context attributes for the content. |
| withFallback | Learn how to set a fallback for the content. |
| hasFallback | Learn how to check whether a fallback was set. |
| getFallback | Learn how to get the fallback value for the content. |