import { AxiosDataFetcher, AxiosResponse, } from "@sitecore-jss/sitecore-jss-nextjs"; /** * Implements a data fetcher using Axios - replace with your favorite * SSR-capable HTTP or fetch library if you like. See HttpDataFetcher type * in sitecore-jss library for implementation details/notes. * @param {string} url The URL to request; may include query string * @param {unknown} data Optional data to POST with the request. */ export function dataFetcher( url: string, data?: unknown, ): Promise> { return new AxiosDataFetcher().fetch(url, data); }