Example • mock-server
In-Browser Mock Server
With mock-server="true", <rapi-doc> answers requests from the spec inside the page, for Try and for the page's own fetch() calls. Pick a status code and a delay below and call the API.
Live Interactive Playground
Test In-Page Fetch Interception Live
The <rapi-doc> element below is mounted with mock-server="true". Use the live test controls to trigger actual window.fetch() requests from this page, and see them intercepted and resolved with mock data in real time!
Frontend
fetch() TesterINTERCEPTOR READYIntercepted in-memory
// Click "Execute In-Page fetch()" above to test interception...