MCPcopy
hub / github.com/axios/axios / trackRequestStream

Function trackRequestStream

lib/adapters/fetch.js:327–338  ·  view source on GitHub ↗
(stream, onProgress, flush)

Source from the content-addressed store, hash-verified

325 hasMaxBodyLength && (utils.isReadableStream(data) || utils.isStream(data));
326
327 const trackRequestStream = (stream, onProgress, flush) =>
328 trackStream(
329 stream,
330 DEFAULT_CHUNK_SIZE,
331 (loadedBytes) => {
332 if (hasMaxBodyLength && loadedBytes > maxBodyLength) {
333 throw (pendingBodyError = maxBodyLengthError());
334 }
335 onProgress && onProgress(loadedBytes);
336 },
337 flush
338 );
339
340 if (
341 supportsRequestStream &&

Callers 1

factoryFunction · 0.85

Calls 2

trackStreamFunction · 0.90
maxBodyLengthErrorFunction · 0.85

Tested by

no test coverage detected