UNPKG

http-request-mock

Version:

Intercept & mock http requests issued by XMLHttpRequest, fetch, nodejs https/http module, axios, jquery, superagent, ky, node-fetch, request, got or any other request libraries by intercepting XMLHttpRequest, fetch and nodejs native requests in low level.

10 lines (9 loc) 523 B
import { ClientRequestOptions, ClientRequestType } from '../../types'; /** * ClientRequest constructor * @param {string} url * @param {object} options options of http.get, https.get, http.request or https.request method. * @param {function} callback callback of http.get, https.get, http.request or https.request method. */ declare function ClientRequest(this: ClientRequestType, url: string, options: ClientRequestOptions, callback: undefined | ((...args: unknown[]) => unknown)): void; export default ClientRequest;