map.apps Bundle APIs 4.20.0
    Preparing search index...

    Function apprtFetchJson

    • Fetches the specified resource and expects a JSON encoded response. It is a small helper to make fetching of json data more simple. It has the checkStatus flag enabled by default and sets the Accept Header to 'application/json'.

      Type Parameters

      • T = unknown

      Parameters

      Returns Promise<T>

      Basic usage:

      import { apprtFetchJson } from "apprt-fetch";
      const jsonData = await apprtFetchJson("https://httpbin.org/get");
      // do something with the json data