Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/nodejs/undici
/ functions
Functions
2,421 in github.com/nodejs/undici
⨍
Functions
2,421
◇
Types & classes
604
↓ 10 callers
Method
refresh
* Sets the timer's start time to the current time, and reschedules the timer * to call its callback at the previously specified duration adjusted t
lib/util/timers.js:286
↓ 10 callers
Method
shift
@returns {T|null}
lib/dispatcher/fixed-queue.js:125
↓ 9 callers
Method
RequestInfo
* @see https://fetch.spec.whatwg.org/#requestinfo
types/webidl.d.ts:229
↓ 9 callers
Method
clone
()
test/types/fetch.test-d.ts:192
↓ 9 callers
Method
every
(predicate: (value: T, index: number) => unknown)
types/fetch.d.ts:81
↓ 9 callers
Method
exception
* @description Instantiate an error
types/webidl.d.ts:18
↓ 9 callers
Method
getSetCookie
()
lib/web/fetch/headers.js:611
↓ 9 callers
Function
makeNetworkError
(reason)
lib/web/fetch/response.js:383
↓ 9 callers
Method
reduce
(callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T)
types/fetch.d.ts:75
↓ 9 callers
Function
startServer
(handler)
test/utils/redirecting-servers.js:15
↓ 8 callers
Method
dispatch
(opts, handler)
lib/mock/mock-agent.js:72
↓ 8 callers
Function
removeSignal
(self)
lib/api/abort-signal.js:41
↓ 8 callers
Function
requestCurrentURL
@returns {URL}
lib/web/fetch/util.js:87
↓ 8 callers
Function
urlIsHttpHttpsScheme
* @see https://fetch.spec.whatwg.org/#http-scheme * @param {URL} url
lib/web/fetch/util.js:1059
↓ 8 callers
Function
wrapWithAsyncIterable
(asyncIterable, indefinite = false)
test/utils/async-iterators.js:3
↓ 7 callers
Method
EventHandlerNonNull
* @see https://html.spec.whatwg.org/multipage/webappapis.html#eventhandlernonnull
types/webidl.d.ts:239
↓ 7 callers
Function
URLSerializer
* @param {URL} url * @param {boolean} excludeFragment
lib/web/fetch/data-url.js:123
↓ 7 callers
Method
createFrame
(opcode)
lib/web/websocket/frame.js:31
↓ 7 callers
Function
createRequestHash
* Creates a hash key for request matching * Properly orders headers to avoid conflicts and uses crypto hashing when available * * @param {SnapshotF
lib/mock/snapshot-recorder.js:214
↓ 7 callers
Function
extractBody
* Extract a body with type from a byte sequence or BodyInit object * * @param {import('../../../types').BodyInit} object - The BodyInit object to ex
lib/web/fetch/body.js:40
↓ 7 callers
Function
formatRequestKey
* Formats a request for consistent snapshot storage * Caches normalized headers to avoid repeated processing * * @param {SnapshotRequestOptions} op
lib/mock/snapshot-recorder.js:124
↓ 7 callers
Function
isCancelled
(fetchParams)
lib/web/fetch/util.js:712
↓ 7 callers
Function
makeParallelRequests
(cb)
benchmarks/benchmark-https.js:135
↓ 7 callers
Function
makeResponse
(init)
lib/web/fetch/response.js:364
↓ 7 callers
Method
redirect
()
lib/web/fetch/request.js:704
↓ 7 callers
Method
retry
()
lib/handler/retry-handler.js:411
↓ 7 callers
Method
sequenceConverter
* @see https://webidl.spec.whatwg.org/#es-sequence * @description Convert a value, V, to a WebIDL sequence type.
types/webidl.d.ts:286
↓ 7 callers
Method
times
* Allow one to define a reply for a set amount of matching requests.
lib/mock/mock-interceptor.js:52
↓ 6 callers
Method
BufferSource
* @see https://webidl.spec.whatwg.org/#BufferSource
types/webidl.d.ts:203
↓ 6 callers
Method
ByteString
* @see https://webidl.spec.whatwg.org/#es-ByteString
types/webidl.d.ts:112
↓ 6 callers
Method
MakeTypeAssertion
(I: I)
types/webidl.d.ts:86
↓ 6 callers
Function
clearHttp2IdleTimeout
(session)
lib/dispatcher/client-h2.js:488
↓ 6 callers
Function
consumeBody
* @see https://fetch.spec.whatwg.org/#concept-body-consume-body * @param {any} object internal state * @param {(value: unknown) => unknown} convertB
lib/web/fetch/body.js:456
↓ 6 callers
Method
cork
()
test/http2-late-data.js:49
↓ 6 callers
Method
createWriteStream
(key: CacheKey, val: CacheValue)
types/cache-interceptor.d.ts:113
↓ 6 callers
Method
delay
* Delay a reply by a set amount in ms.
lib/mock/mock-interceptor.js:32
↓ 6 callers
Function
fromInnerResponse
* @see https://fetch.spec.whatwg.org/#response-create * @param {any} innerResponse * @param {'request' | 'immutable' | 'request-no-cors' | 'response
lib/web/fetch/response.js:549
↓ 6 callers
Function
isAborted
(fetchParams)
lib/web/fetch/util.js:708
↓ 6 callers
Function
isValidHTTPToken
* @param {string} characters * @returns {boolean}
lib/core/util.js:752
↓ 6 callers
Method
lookup
* @param {Uint8Array} key * @returns {any}
lib/core/tree.js:145
↓ 6 callers
Function
makeParallelRequests
(cb)
benchmarks/benchmark-http2.js:119
↓ 6 callers
Function
parseHttpDate
* @see https://www.rfc-editor.org/rfc/rfc9110.html#name-date-time-formats * * @param {string} date * @returns {Date | undefined}
lib/util/date.js:9
↓ 6 callers
Method
persist
* For a defined reply, never mark as consumed.
lib/mock/mock-interceptor.js:44
↓ 6 callers
Method
run
* Runs whenever a new chunk is received. * Callback is called whenever there are no more chunks buffering, * or not enough bytes are buffered to
lib/web/websocket/receiver.js:96
↓ 6 callers
Method
setTimeout
(delay, type)
lib/dispatcher/client-h1.js:246
↓ 6 callers
Method
setTimeout
()
test/http2-late-data.js:43
↓ 6 callers
Method
uncork
()
test/http2-late-data.js:50
↓ 5 callers
Function
abort
(err, resetPendingIdx = false)
lib/dispatcher/client-h2.js:1040
↓ 5 callers
Function
assertCacheKey
* @param {any} key
lib/util/cache.js:260
↓ 5 callers
Function
bodyUnusable
* @see https://fetch.spec.whatwg.org/#body-unusable * @param {any} object internal state
lib/web/fetch/body.js:508
↓ 5 callers
Method
bytes
()
types/dispatcher.d.ts:244
↓ 5 callers
Function
closeWebSocketConnection
* @see https://whatpr.org/websockets/48.html#close-the-websocket * @param {import('./websocket').Handler} object * @param {number} [code=null] * @p
lib/web/websocket/connection.js:227
↓ 5 callers
Function
coarsenedSharedCurrentTime
(crossOriginIsolatedCapability)
lib/web/fetch/util.js:340
↓ 5 callers
Function
collectASequenceOfCodePoints
* @param {(char: string) => boolean} condition * @param {string} input * @param {{ position: number }} position * @returns {string} * * @see http
lib/web/infra/index.js:14
↓ 5 callers
Function
collectASequenceOfCodePointsFast
* A faster collectASequenceOfCodePoints that only works when comparing a single character. * @param {string} char * @param {string} input * @param
lib/web/infra/index.js:41
↓ 5 callers
Function
connectH2
(client, socket)
lib/dispatcher/client-h2.js:247
↓ 5 callers
Function
consume
* @template {ConsumeType} T * @param {BodyReadable} stream * @param {T} type * @returns {Promise<ConsumeReturnType<T>>}
lib/api/readable.js:391
↓ 5 callers
Method
conversionFailed
* @description Instantiate an error when conversion from one type to another has failed
types/webidl.d.ts:22
↓ 5 callers
Function
detachRequestFromStream
(request)
lib/dispatcher/client-h2.js:135
↓ 5 callers
Function
getFieldValues
* @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L2
lib/web/cache/util.js:26
↓ 5 callers
Method
invalidArgument
* @description Throw an error when an invalid argument is provided
types/webidl.d.ts:30
↓ 5 callers
Method
isEmpty
@returns {boolean}
lib/dispatcher/fixed-queue.js:110
↓ 5 callers
Function
isEstablished
* @param {number} readyState * @returns {boolean}
lib/web/websocket/util.js:22
↓ 5 callers
Method
loadSnapshots
* Loads snapshots from file * * @param {string} [filePath] - Optional file path to load snapshots from. * @returns {Promise<void>} - Resolves
lib/mock/snapshot-agent.js:237
↓ 5 callers
Function
matchValue
(match, value)
lib/mock/mock-utils.js:22
↓ 5 callers
Method
nullableConverter
* @see https://webidl.spec.whatwg.org/#idl-nullable-type * @description allows a type, V, to be null
types/webidl.d.ts:328
↓ 5 callers
Function
parseHeaders
* @param {(Buffer | string)[]} headers * @param {Record<string, string | string[]>} [obj] * @returns {Record<string, string | string[]>}
lib/core/util.js:425
↓ 5 callers
Function
sameOrigin
* @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} * @param {URL} A * @param {URL} B
lib/web/fetch/util.js:692
↓ 5 callers
Method
saveSnapshots
* Saves snapshots to file * * @param {string} [filePath] - Optional file path to save snapshots to. * @returns {Promise<void>} - Resolves whe
lib/mock/snapshot-agent.js:253
↓ 5 callers
Method
size
()
lib/interceptor/dns.js:115
↓ 4 callers
Method
#pruneDoneWaitingHandlers
()
lib/handler/deduplication-handler.js:455
↓ 4 callers
Function
addAbortListener
(signal, listener)
lib/core/util.js:705
↓ 4 callers
Method
addEventListener
( type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | A
types/eventsource.d.ts:28
↓ 4 callers
Function
addSignal
(self, signal)
lib/api/abort-signal.js:18
↓ 4 callers
Method
calls
()
lib/mock/mock-call-history.js:130
↓ 4 callers
Method
cleanMocks
Clean up all the prepared mocks.
types/mock-interceptor.d.ts:91
↓ 4 callers
Function
createHeaderFilters
* Creates cached header sets for performance * * @param {import('./snapshot-recorder').SnapshotRecorderMatchOptions} matchOptions - Matching options
lib/mock/snapshot-utils.js:19
↓ 4 callers
Function
createReadable
(data)
test/utils/stream.js:5
↓ 4 callers
Method
decompress
* Decompress a compressed payload. * @param {Buffer} chunk Compressed data * @param {boolean} fin Final fragment flag * @param {Function} cal
lib/web/websocket/permessage-deflate.js:35
↓ 4 callers
Function
deleteMockDispatch
(mockDispatches, key)
lib/mock/mock-utils.js:221
↓ 4 callers
Method
destroy
* Destroy the client and underlying socket
lib/core/socks5-client.js:141
↓ 4 callers
Method
dispatch
()
lib/dispatcher/dispatcher.js:5
↓ 4 callers
Method
dispatch
()
test/node-test/balanced-pool.js:61
↓ 4 callers
Method
enableNetConnect
(matcher)
lib/mock/mock-agent.js:107
↓ 4 callers
Function
failUpgradeStream
(state, err)
lib/dispatcher/client-h2.js:889
↓ 4 callers
Function
fetching
({ request, processRequestBodyChunkLength, processRequestEndOfBody, processResponse, processResponse
lib/web/fetch/index.js:406
↓ 4 callers
Function
fn
(origin)
test/mock-utils.js:375
↓ 4 callers
Method
getRecorder
* Gets the snapshot recorder * @return {SnapshotRecorder} - The snapshot recorder instance
lib/mock/snapshot-agent.js:297
↓ 4 callers
Function
getResponse
(body)
lib/mock/mock-utils.js:292
↓ 4 callers
Method
getSnapshots
* Gets all recorded snapshots * @return {Array<SnapshotEntry>} - Array of all recorded snapshots
lib/mock/snapshot-recorder.js:485
↓ 4 callers
Method
interfaceConverter
* Similar to {@link Webidl.brandCheck} but allows skipping the check if third party * interfaces are allowed.
types/webidl.d.ts:303
↓ 4 callers
Function
isBlobLike
* @param {*} object * @returns {object is Blob}
lib/core/util.js:87
↓ 4 callers
Function
isDisturbed
* A body is disturbed if it has been read from and it cannot be re-used without * losing state or data. * @param {import('node:stream').Readable} bo
lib/core/util.js:613
↓ 4 callers
Function
isStream
* @param {*} obj * @returns {obj is import('node:stream').Stream}
lib/core/util.js:79
↓ 4 callers
Function
isValidHeaderValue
* @param {string} characters * @returns {boolean}
lib/core/util.js:779
↓ 4 callers
Function
isValidSubprotocol
* @see https://datatracker.ietf.org/doc/html/rfc6455 * @see https://datatracker.ietf.org/doc/html/rfc2616 * @see https://bugs.chromium.org/p/chromiu
lib/web/websocket/util.js:101
↓ 4 callers
Function
isomorphicEncode
* @param {string} input * @returns {string} * * @see https://infra.spec.whatwg.org/#isomorphic-encode
lib/web/infra/index.js:149
↓ 4 callers
Function
makeCacheKey
* @param {import('../../types/dispatcher.d.ts').default.DispatchOptions} opts
lib/util/cache.js:150
↓ 4 callers
Function
makeRequest
(init)
lib/web/fetch/request.js:912
↓ 4 callers
Method
onResponseStarted
Invoked when response is received, before headers have been read.
types/dispatcher.d.ts:227
← previous
next →
101–200 of 2,421, ranked by callers