CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-xmlhttprequest

tessl install tessl/npm-xmlhttprequest@1.8.0

XMLHttpRequest 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%

task.mdevals/scenario-9/

Local File Fetcher

A small utility for retrieving UTF-8 text from local files addressed by file:// URLs, supporting both asynchronous and synchronous reads.

Capabilities

Fetch existing file asynchronously

  • Given a file:// URL pointing to fixtures/greeting.txt containing Hello from file!, reading the file resolves with the exact contents as a string. @test

Handle missing file

  • Reading a file:// URL for a missing file rejects with an Error whose message includes the requested file name. @test

Fetch synchronously

  • Reading fixtures/short.txt via its file:// URL using the synchronous entry point returns the exact content string without involving promises. @test

Implementation

@generates

API

export async function readLocalFile(fileUrl: string): Promise<string>;
export function readLocalFileSync(fileUrl: string): string;

Dependencies { .dependencies }

xmlhttprequest { .dependency }

Provides a browser-like request interface for HTTP(S) and local file URLs.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/xmlhttprequest@1.8.x
tile.json