A very common reason is a wrong site baseUrl configuration.\n

Current configured baseUrl = /fetch-mock/ \n

We suggest trying baseUrl = \n\n',document.body.prepend(n);var e=document.getElementById("__docusaurus-base-url-issue-banner-suggestion-container"),s=window.location.pathname,o="/"===s.substr(-1)?s:s+"/";e.innerHTML=o}document.addEventListener("DOMContentLoaded",(function(){void 0===window.docusaurus&&insertBanner()}))

Skip to main content

Fetch Mock

Powerful mocking of the fetch API.

Easy to Use

Easy to Use

An intuitive, powerful API for creating a mock that targets different requests based on a variety of criteria.

Focus on What Matters

Comprehensive

Allows the behaviour of most aspects of the fetch API to be overridden.

Powered by React

Flexible

Runs in a wide range of environments, from node.js to service workers, and compatible with most testing frameworks.