_ __ ___ ___ _ __ ___ _ __ ___ ___ ___ _ __ _ _
| '__/ _ \/ __| '_ \ / _ \| '_ \/ __|/ _ \ / __| '_ \| | | |
| | | __/\__ \ |_) | (_) | | | \__ \ __/ \__ \ |_) | |_| |
|_| \___||___/ .__/ \___/|_| |_|___/\___| |___/ .__/ \__, |
| | | | __/ |
|_| |_| |___/
Node module for intercepting HTTP responses sent in your apps.
Example
var http = ;var intercept = ; http;console;console;
How does it work?
It overrides the OutgoingMessage
native functions (write
, writeHead
, end
, setHeader
, removeHeader
), without affecting your apps (the original functions will be called with the same params, these are just thin wrappers).
With response-spy
you practically get a ReadableStream
from your response
object.
Use cases
- generating cache
- traffic analysis
- etc