# wendux/ajax-hook

Intercepting browser's http requests which made by XMLHttpRequest.

Repository: https://github.com/wendux/ajax-hook
Canonical: https://ross.abutalabs.com/products/ajax-hook
Language: JavaScript
License Family: other
Topics: ajax, ajax-hook, xmlhttprequest-hook, hooks
Last push: 2023-09-24T07:12:58+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3567, "days_push": 1074, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2659, forks 484 (observed 2026-08-28T04:07:07.409270+00:00)

## What it is
A lightweight JavaScript library that intercepts browser HTTP requests made via XMLHttpRequest, letting you hook into requests before they are sent, responses after they arrive, and errors when they occur. It works on any ES5-compatible browser without relying on ES6 Proxy, and can also intercept same-origin iframe requests.

## Use cases
- intercept all XMLHttpRequest requests in the browser
- modify request config before it is sent
- mock or short-circuit ajax responses with handler.resolve
- log or inspect ajax responses and errors
- preprocess network requests inside a same-origin iframe
- build browser extensions or debugging tools that hook XHR traffic

## When to choose
- you need to intercept or modify XHR-based ajax traffic in a browser environment
- you must support legacy ES5 browsers
- you want a tiny dependency-free hooking library with proxy/unProxy control

## When to avoid
- your app uses fetch or other non-XHR request APIs exclusively
- you need to intercept cross-origin iframe requests
- you need full network-layer interception rather than XHR object hooking

## Facets
- artifact type: library
- maturity: stable
- function: http-client, middleware, developer-tools
- domain: web-development, frontend, developer-tools, apis
- platform: browser
- tags: xmlhttprequest, ajax-interception, request-hooking, mocking, es5-compatible, web-server

## Member repositories
- wendux/ajax-hook (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:07.409270+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:18:25.532814+00:00, confidence not recorded.
  - readme: https://github.com/wendux/ajax-hook (fetched 2026-08-28T04:07:07.409270+00:00, sha aa3d553ab71d)
  - registry_npm: https://registry.npmjs.org/ajax-hook (fetched 2026-08-29T10:01:29.403751+00:00, sha 8229ae8798d2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
