tessl install tessl/npm-xmlhttprequest@1.8.0XMLHttpRequest for Node.js that emulates the browser XMLHttpRequest object
Agent Success
Agent success rate when using this tile
75%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.15x
Baseline
Agent success rate without this tile
65%
Implement a small utility that streams a text HTTP response while surfacing incremental progress updates before completion.
onProgress callback for each incoming chunk before the download completes, providing the cumulative bytes received and the latest text fragment. @testonProgress once before completion with the full body length. @testaborted result without emitting any further progress callbacks. @test@generates
/**
* Streams a text response from the given URL and emits progress updates before completion.
*
* @param {object} options
* @param {string} options.url - HTTP or HTTPS endpoint to request.
* @param {(update: { received: number, chunk: string, total?: number }) => void} options.onProgress - called for each chunk before the download finishes.
* @param {AbortSignal} [options.signal] - optional abort signal to halt the request mid-stream.
* @returns {Promise<{ body: string, totalBytes: number, aborted: boolean }>} resolves with the final body and size, or indicates an aborted request.
*/
export function streamTextWithProgress(options);Provides streaming HTTP requests with incremental progress callbacks.