{"library":"js-fetch-api","type":"library","category":null,"description":"A React fetch utility that wraps the native fetch API with Redux Thunk action dispatching. Version 1.3.5 provides structured error responses as JSON including status, headers, stack trace, and messages. It automatically dispatches request/success/failure Redux actions, with special handling for redirects (3xx), client errors (4xx), unauthorized (401), and server errors (5xx). For development, it supports mocking with configurable success/error rates and simulated delays. The package also sets a CSRF protection cookie (NAV_CSRF_PROTECTION) and a timestamp parameter to prevent browser caching. Ships TypeScript type definitions. Differentiates from plain fetch and other fetch wrappers by tight Redux Thunk integration and development simulation capabilities.","language":"javascript","status":"active","version":"1.3.5","tags":["javascript","typescript"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install js-fetch-api","imports":["import { call } from 'js-fetch-api'","import { ActionWithPayload } from 'js-fetch-api'","import { ThunkResult } from 'js-fetch-api'","import fetchApi from 'js-fetch-api'"]},{"cmd":"yarn add js-fetch-api","imports":[]},{"cmd":"pnpm add js-fetch-api","imports":[]}],"homepage":"http://.","github":"https://github.com/navikt/fetch-api","docs":null,"changelog":null,"pypi":null,"npm":"js-fetch-api","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}