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%

rubric.jsonevals/scenario-8/

{
  "context": "Evaluates whether the ResourceClient uses xmlhttprequest to perform the async GET/POST/PUT/DELETE/HEAD calls defined in the spec, wiring up the browser-style API correctly for methods, headers, bodies, and response parsing. Focuses solely on correct use of the XMLHttpRequest interface to satisfy the required behaviors.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Async setup",
      "description": "Each request constructs a new XMLHttpRequest and calls open(method, fullUrl, true) so calls are asynchronous and include the baseUrl + path.",
      "max_score": 15
    },
    {
      "name": "Ready state",
      "description": "Uses onreadystatechange (or addEventListener('readystatechange')) to detect readyState === XMLHttpRequest.DONE before resolving, capturing status for every verb.",
      "max_score": 15
    },
    {
      "name": "GET parsing",
      "description": "GET requests rely on XMLHttpRequest.responseText (or response) after DONE and JSON.parse it when status 200 to produce the body expected by the spec.",
      "max_score": 15
    },
    {
      "name": "POST/PUT body",
      "description": "POST and PUT setRequestHeader('Content-Type','application/json') and send(JSON.stringify(data)) so the payloads arrive as JSON before reading the JSON response body.",
      "max_score": 15
    },
    {
      "name": "Header handling",
      "description": "Merges default and per-call headers via setRequestHeader before send, including propagating caller-provided headers for HEAD as required.",
      "max_score": 10
    },
    {
      "name": "HEAD headers",
      "description": "HEAD uses open('HEAD', ...) and collects headers via getAllResponseHeaders() or getResponseHeader to return them with no response body.",
      "max_score": 10
    },
    {
      "name": "DELETE flow",
      "description": "DELETE uses open('DELETE', ...) with async=true, sends no body, and resolves once DONE with status 204 and an empty body.",
      "max_score": 10
    },
    {
      "name": "Error handling",
      "description": "Registers onerror (or equivalent) to reject when XMLHttpRequest fails (e.g., network error), ensuring status 0 is surfaced rather than hanging.",
      "max_score": 10
    }
  ]
}

Version

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