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%
Implements HTTP helpers that can deliberately send headers normally blocked by user agents when explicitly permitted by the caller.
Referer) and resolves with parsed JSON and status details. @testContent-Length header and returns the echoed length reported by the server. @test@generates
export type ForbiddenRequestOptions = {
allowForbiddenHeaders: boolean;
timeoutMs?: number;
};
export type JsonFetchResult = {
status: number;
data: unknown;
receivedHeader?: string;
};
export type PostLengthResult = {
status: number;
echoedLength: number;
responseText: string;
};
export function fetchJsonWithForbiddenHeader(
url: string,
headerName: string,
headerValue: string,
options?: ForbiddenRequestOptions
): Promise<JsonFetchResult>;
export function postWithManualLength(
url: string,
bodyText: string,
lengthOverride: number,
options?: ForbiddenRequestOptions
): Promise<PostLengthResult>;Node implementation of the XMLHttpRequest interface used to perform HTTP requests and manage header protections.