Skip to content

v0.6.0

Compare
Choose a tag to compare
@kettanaito kettanaito released this 18 Dec 09:46

Features

  • Adds the event emitter to listen to internal events. Supports the response event fired upon any mocked/original response.
import { RequestInterceptor } from 'node-request-interceptor'

const interceptor = new RequestInterceptor(interceptors)
interceptor.on('response', (req, res) => {})

Note that you cannot affect req/res in the response event.