Fetch layout data using a custom REST data fetcher
Version:
The JSS RestLayoutServiceConfig type accepts a dataFetcherResolver property. You can use this property to pass a custom data fetcher to your instance of the Layout Service. By default, the JSS REST Layout service uses axios.
To use a REST layout service with a custom data fetcher:
-
In a
layout-service.tsfile, create an instance of theRestLayoutServiceclass and provide the configuration object: -
Import and use the new layout service: