{"library":"fetch-interceptor","type":"library","category":null,"description":"A lightweight library to intercept and modify fetch requests and responses in the browser. Current stable version is 1.1.0. It provides hooks for before request, on response success, and on response failure. Key differentiator is its simplicity and zero dependencies, unlike more complex alternatives like Mock Service Worker or Polly.js. The library is actively maintained with a small API surface, making it easy to integrate into any project that uses the Fetch API. It is released on npm and supports CommonJS and ES modules via module field.","language":"javascript","status":"active","version":"1.1.0","tags":["javascript","fetch","fetch-api","http","request","intercept","interceptor","fetch-intercept","fetch-interceptor"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install fetch-interceptor","imports":["import fetchInterceptor from 'fetch-interceptor';","const FetchInterceptor = require('fetch-interceptor');","const interceptor = FetchInterceptor.register({ onBeforeRequest, onRequestSuccess, onRequestFailure });","interceptor.unregister();"]},{"cmd":"yarn add fetch-interceptor","imports":[]},{"cmd":"pnpm add fetch-interceptor","imports":[]}],"homepage":"https://github.com/itsfadnis/fetch-interceptor","github":"https://github.com/itsfadnis/fetch-interceptor","docs":null,"changelog":null,"pypi":null,"npm":"fetch-interceptor","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}