{"library":"http-request-mock","type":"library","category":null,"description":"http-request-mock is a versatile JavaScript/TypeScript library designed for intercepting and mocking HTTP requests across various environments and client libraries. It operates at a low level, directly hooking into XMLHttpRequest, fetch, and Node.js's native http/https modules, allowing it to mock requests from popular libraries like Axios, jQuery, Superagent, Ky, Node-Fetch, and Got without specific integrations for each. The current stable version is 2.0.2. The library aims to provide a 'non-hacking' approach to mocking by offering a webpack plugin and a command-line tool, enabling separation of mock data from business logic and eliminating the need for code modifications during development or testing. Its core differentiator is this low-level, environment-agnostic interception combined with tooling for externalizing mock configurations, which distinguishes it from libraries that require proxy setups or direct code alterations.","language":"javascript","status":"active","version":"2.0.2","tags":["javascript","xhr mock","XMLHttpRequest mock","xhr-mock","fetch mock","fetch-mock","wx.request mock","response mock","ajax mock","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install http-request-mock","imports":["import mock from 'http-request-mock'","import type { MockOptions } from 'http-request-mock'","import type { MockItem } from 'http-request-mock'"]},{"cmd":"yarn add http-request-mock","imports":[]},{"cmd":"pnpm add http-request-mock","imports":[]}],"homepage":"https://huturen.github.io/http-request-mock-docs/","github":"https://github.com/huturen/http-request-mock","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/http-request-mock","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/http-request-mock/compatibility"}}