Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/mswjs/interceptors
/ functions
Functions
345 in github.com/mswjs/interceptors
⨍
Functions
345
◇
Types & classes
133
↓ 2 callers
Function
deleteGlobalSymbol
(symbol: Symbol)
src/Interceptor.ts:29
↓ 2 callers
Method
dispatchEvent
( event: WebSocketTransportEventMap[EventType] )
src/interceptors/WebSocket/WebSocketClassTransport.ts:59
↓ 2 callers
Function
encode
(text: string, encoding: BufferEncoding)
test/modules/http/compliance/http-res-set-encoding.test.ts:34
↓ 2 callers
Method
execute
(buffer: Buffer)
_http_common.d.ts:35
↓ 2 callers
Method
flushWriteBuffer
()
src/interceptors/ClientRequest/MockHttpSocket.ts:500
↓ 2 callers
Function
forceGc
()
test/modules/fetch/fetch-memory-worker.js:67
↓ 2 callers
Function
forwardServerUrl
(page: Page)
test/modules/fetch/response/fetch-response-patching.browser.test.ts:22
↓ 2 callers
Function
freeParser
(parser: HTTPParser<any>, socket?: Socket)
src/interceptors/ClientRequest/utils/parserUtils.ts:7
↓ 2 callers
Function
getAgent
( options: ResolvedRequestOptions )
src/utils/getUrlByRequestOptions.ts:21
↓ 2 callers
Function
getClientRequestBodyStream
(request: Request)
src/utils/node/index.ts:15
↓ 2 callers
Function
getDeepPropertyDescriptor
( owner: Owner, key: keyof Owner )
src/utils/patchesRegistry.ts:115
↓ 2 callers
Method
getInstance
()
src/Interceptor.ts:234
↓ 2 callers
Function
getPortByRequestOptions
( options: ResolvedRequestOptions )
src/utils/getUrlByRequestOptions.ts:45
↓ 2 callers
Function
handleResponse
( response: Response | Error | Record<string, any> )
src/utils/handleRequest.ts:26
↓ 2 callers
Method
initialize
(type: ParserType, asyncResource: object)
_http_common.d.ts:34
↓ 2 callers
Method
isConfigurableMethod
* Check if the given request method is configurable. * @see https://fetch.spec.whatwg.org/#methods
src/utils/fetchUtils.ts:24
↓ 2 callers
Method
isMethodWithBody
(method: string)
src/utils/fetchUtils.ts:28
↓ 2 callers
Function
isPlainObject
(obj?: Record<string, any>)
src/utils/cloneObject.ts:5
↓ 2 callers
Function
makeRequest
()
test/modules/http/compliance/http-res-read-multiple-times.test.ts:62
↓ 2 callers
Method
off
( event: EventName, listener: Listener<Events[EventName]> )
src/Interceptor.ts:176
↓ 2 callers
Function
parallelRequests
( makeRequest: (index: number) => Promise<PromisifiedResponse> )
test/modules/http/http-performance.test.ts:17
↓ 2 callers
Method
parseRawHeaders
* Parses the given raw HTTP headers into a Fetch API `Headers` instance.
src/utils/fetchUtils.ts:248
↓ 2 callers
Function
readIncomingMessage
(res: http.IncomingMessage)
test/modules/http/compliance/http-res-set-encoding.test.ts:38
↓ 2 callers
Function
recordRawHeader
( headers: Headers, args: HeaderTuple, behavior: SetHeaderBehavior )
src/interceptors/ClientRequest/utils/recordRawHeaders.ts:10
↓ 2 callers
Method
registerUploadEvent
( eventName: keyof XMLHttpRequestEventTargetEventMap, listener: Function )
src/interceptors/XMLHttpRequest/XMLHttpRequestController.ts:278
↓ 2 callers
Function
sameOrigin
* @see https://github.com/nodejs/undici/blob/a6dac3149c505b58d2e6d068b97f4dc993da55f0/lib/web/fetch/util.js#L761
src/interceptors/fetch/utils/followRedirect.ts:100
↓ 2 callers
Method
setStatus
(status: number, response: Response)
src/utils/fetchUtils.ts:191
↓ 2 callers
Function
toAbsoluteUrl
(url: string | URL)
src/interceptors/XMLHttpRequest/XMLHttpRequestController.ts:721
↓ 1 callers
Method
addEventListener
* Listen for the incoming events from the original WebSocket server.
src/interceptors/WebSocket/WebSocketServerConnection.ts:208
↓ 1 callers
Function
baseUrlFromConnectionOptions
(options: any)
src/interceptors/Socket/utils/baseUrlFromConnectionOptions.ts:1
↓ 1 callers
Method
checkEnvironment
* Determine if this interceptor can be applied * in the current environment.
src/Interceptor.ts:70
↓ 1 callers
Method
clearInstance
()
src/Interceptor.ts:245
↓ 1 callers
Method
close
(code: number = 1000, reason?: string)
src/interceptors/WebSocket/WebSocketOverride.ts:163
↓ 1 callers
Method
connect
* Open connection to the original WebSocket server.
src/interceptors/WebSocket/WebSocketServerConnection.ts:121
↓ 1 callers
Function
createBrowserXMLHttpRequest
(page: Page)
test/helpers.ts:277
↓ 1 callers
Function
createDecompressionStream
( contentEncoding: string )
src/interceptors/fetch/utils/decompression.ts:32
↓ 1 callers
Function
createHeadersFromXMLHttpRequestHeaders
(headersString: string)
src/interceptors/XMLHttpRequest/utils/createResponse.ts:33
↓ 1 callers
Function
createResponse
( request: XMLHttpRequest, body: BodyInit | null )
src/interceptors/XMLHttpRequest/utils/createResponse.ts:7
↓ 1 callers
Function
createServerErrorResponse
(body: unknown)
src/utils/responseUtils.ts:7
↓ 1 callers
Function
createXMLHttpRequestProxy
({ emitter, logger, }: XMLHttpRequestProxyOptions)
src/interceptors/XMLHttpRequest/XMLHttpRequestProxy.ts:18
↓ 1 callers
Function
decodeMessage
( // @ts-expect-error encodedEngineIoPacket )
test/modules/WebSocket/third-party/socket.io.browser.test.ts:62
↓ 1 callers
Function
decompressResponse
( response: Response )
src/interceptors/fetch/utils/decompression.ts:65
↓ 1 callers
Function
defineRawHeadersSymbol
* Define the raw headers symbol on the given `Headers` instance. * If the symbol already exists, it gets overridden.
src/interceptors/ClientRequest/utils/recordRawHeaders.ts:49
↓ 1 callers
Function
encodeMessage
(data)
test/modules/WebSocket/third-party/socket.io.browser.test.ts:86
↓ 1 callers
Method
errorWith
* Close this socket connection with the given error.
src/interceptors/ClientRequest/MockHttpSocket.ts:457
↓ 1 callers
Function
fireBatch
(count, concurrency)
test/modules/fetch/fetch-memory-worker.js:34
↓ 1 callers
Function
followFetchRedirect
( request: Request, response: Response )
src/interceptors/fetch/utils/followRedirect.ts:16
↓ 1 callers
Method
free
()
_http_common.d.ts:49
↓ 1 callers
Function
getAuthByRequestOptions
( options: ResolvedRequestOptions )
src/utils/getUrlByRequestOptions.ts:74
↓ 1 callers
Function
getDataSize
(data: WebSocketData)
src/interceptors/WebSocket/WebSocketOverride.ts:242
↓ 1 callers
Function
getHeader
(name: string)
test/modules/http/response/http-response-patching.test.ts:28
↓ 1 callers
Function
getHostname
(options: ResolvedRequestOptions)
src/utils/getUrlByRequestOptions.ts:92
↓ 1 callers
Method
getManufacturer
()
src/utils/cloneObject.test.ts:43
↓ 1 callers
Function
getProtocolByRequestOptions
(options: ResolvedRequestOptions)
src/utils/getUrlByRequestOptions.ts:27
↓ 1 callers
Function
getResponse
(request: Request)
test/modules/http/response/http-response-patching.test.ts:15
↓ 1 callers
Function
getWebpackHttpServer
()
test/webpackHttpServer.ts:10
↓ 1 callers
Method
handleMockClose
(_event: Event)
src/interceptors/WebSocket/WebSocketServerConnection.ts:385
↓ 1 callers
Method
handleRealClose
(event: CloseEvent)
src/interceptors/WebSocket/WebSocketServerConnection.ts:392
↓ 1 callers
Function
handleResponseError
(error: unknown)
src/utils/handleRequest.ts:59
↓ 1 callers
Function
httpsGet
( url: string, options?: RequestOptions )
test/helpers.ts:37
↓ 1 callers
Function
isBufferEqual
(left: ArrayBuffer, right: ArrayBuffer)
test/modules/XMLHttpRequest/compliance/xhr-response-type.test.ts:99
↓ 1 callers
Method
isConfigurableMode
* Check if the given request `mode` is configurable. * @see https://fetch.spec.whatwg.org/#concept-request-mode
src/utils/fetchUtils.ts:40
↓ 1 callers
Method
isConfigurableStatusCode
(status: number)
src/utils/fetchUtils.ts:175
↓ 1 callers
Function
isDomParserSupportedType
( type: string )
src/interceptors/XMLHttpRequest/utils/isDomParserSupportedType.ts:1
↓ 1 callers
Function
isNodeLikeError
( error: unknown )
src/utils/isNodeLikeError.ts:1
↓ 1 callers
Function
isRawIPv6Address
* Returns true if host looks like an IPv6 address without surrounding brackets * It assumes any host containing `:` is definitely not IPv4 and probab
src/utils/getUrlByRequestOptions.ts:88
↓ 1 callers
Method
isRedirectResponse
(status: number)
src/utils/fetchUtils.ts:179
↓ 1 callers
Function
isResponseLike
(value: unknown)
src/utils/responseUtils.ts:52
↓ 1 callers
Function
makeRequest
()
test/features/remote/child.js:6
↓ 1 callers
Method
mockConnect
()
src/interceptors/ClientRequest/MockHttpSocket.ts:461
↓ 1 callers
Function
nextTickAsync
(callback: () => void)
src/utils/nextTick.ts:5
↓ 1 callers
Function
optionsToProxyHandler
( options: ProxyOptions<T> )
src/utils/createProxy.ts:34
↓ 1 callers
Function
overrideUrlByRequestOptions
* Overrides the given `URL` instance with the explicit properties provided * on the `RequestOptions` object. The options object takes precedence, *
src/interceptors/ClientRequest/utils/normalizeClientRequestArgs.ts:83
↓ 1 callers
Method
passthrough
* Establish this Socket connection as-is and pipe * its data/events through this Socket.
src/interceptors/ClientRequest/MockHttpSocket.ts:185
↓ 1 callers
Function
promisifyClientRequest
( getRequest: () => http.ClientRequest )
test/modules/http/regressions/http-concurrent-same-host.test.ts:29
↓ 1 callers
Function
randomBetween
(min: number, max: number)
test/modules/http/http-performance.test.ts:13
↓ 1 callers
Function
readBlob
( blob: Blob )
test/helpers.ts:141
↓ 1 callers
Method
registerEvent
( eventName: keyof XMLHttpRequestEventTargetEventMap, listener: Function )
src/interceptors/XMLHttpRequest/XMLHttpRequestController.ts:267
↓ 1 callers
Method
remove
()
_http_common.d.ts:47
↓ 1 callers
Function
resolveWebSocketUrl
(url: string | URL)
src/utils/resolveWebSocketUrl.ts:7
↓ 1 callers
Method
restoreAllPatches
()
src/utils/patchesRegistry.ts:79
↓ 1 callers
Function
setGlobalSymbol
(symbol: Symbol, value: any)
src/Interceptor.ts:24
↓ 1 callers
Method
setInstance
()
src/Interceptor.ts:240
↓ 1 callers
Function
setRawRequestBodyStream
( request: Request, stream: Readable )
src/utils/node/index.ts:34
↓ 1 callers
Method
setup
()
src/RemoteHttpInterceptor.ts:152
↓ 1 callers
Function
startWebpackServer
()
test/webpackHttpServer.ts:20
↓ 1 callers
Method
toFetchApiRequest
* Converts this `XMLHttpRequest` instance into a Fetch API `Request` instance.
src/interceptors/XMLHttpRequest/XMLHttpRequestController.ts:665
↓ 1 callers
Method
toText
()
test/modules/http/compliance/http-res-read-multiple-times.test.ts:49
↓ 1 callers
Method
unconsume
()
_http_common.d.ts:46
Method
#handled
()
src/RequestController.ts:33
Function
FakeGlobalScope
()
src/utils/hasConfigurableGlobal.test.ts:89
Function
FakeGlobalScope
()
src/utils/patchesRegistry.test.ts:38
Method
[kClose]
( code: number = 1000, reason?: string, wasClean = true )
src/interceptors/WebSocket/WebSocketOverride.ts:173
Method
[kSend]
(data: WebSocketData)
src/interceptors/WebSocket/WebSocketServerConnection.ts:257
Method
addEventListener
( type: EventType, callback: StrictEventListenerOrEventListenerObject< WebSocketTransportEventMa
src/interceptors/WebSocket/WebSocketClassTransport.ts:49
Method
addEventListener
* Listen for the outgoing events from the connected WebSocket client.
src/interceptors/WebSocket/WebSocketClientConnection.ts:98
Function
apply
(target, thisArg, args: HeaderTuple)
src/interceptors/ClientRequest/utils/recordRawHeaders.ts:167
Method
cancelable
()
src/interceptors/WebSocket/utils/events.ts:21
Method
cancelable
()
src/interceptors/WebSocket/utils/events.ts:73
Method
checkEnvironment
()
src/Interceptor.test.ts:93
← previous
next →
101–200 of 345, ranked by callers