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'.
checkStatus
Optional
Basic usage:
import { apprtFetchJson } from "apprt-fetch";const jsonData = await apprtFetchJson("https://httpbin.org/get");// do something with the json data Copy
import { apprtFetchJson } from "apprt-fetch";const jsonData = await apprtFetchJson("https://httpbin.org/get");// do something with the json data
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'.