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%
Build a helper that issues an HTTP request and progressively reports incoming text chunks while also exposing the final status code and status message provided by the server.
status: 200, statusText: "OK READY", and a body containing the full response text. @teststatus: 503, preserves the status message from the server, and returns a body of "busy" even though the response indicates failure. @test@generates
/**
* Performs an HTTP request that streams text chunks to an optional handler and resolves when the response finishes.
*
* @param {Object} options
* @param {string} options.url - Target URL to request.
* @param {string} [options.method="GET"] - HTTP method to use; must support GET and HEAD at minimum.
* @param {(chunk: string) => void} [options.onChunk] - Invoked immediately for each incoming text fragment, in order.
* @returns {Promise<{ status: number, statusText: string, body: string }>} Resolves with final status details and concatenated body.
*/
export async function fetchWithStreaming(options);Provides an HTTP client capable of streaming response text and exposing status information.