import type { IActionHttp, IActorHttpOutput, IActorHttpArgs } from '@comunica/bus-http'; import { ActorHttp } from '@comunica/bus-http'; import type { ActorHttpInvalidateListenable } from '@comunica/bus-http-invalidate'; import type { TestResult } from '@comunica/core'; import type { IMediatorTypeTime } from '@comunica/mediatortype-time'; export declare class ActorHttpFetch extends ActorHttp { private readonly fetchInitPreprocessor; private static readonly userAgent; constructor(args: IActorHttpFetchArgs); test(_action: IActionHttp): Promise>; run(action: IActionHttp): Promise; /** * Prepares the request headers, taking into account the environment. * @param {IActionHttp} action The HTTP action * @returns {Headers} Headers */ prepareRequestHeaders(action: IActionHttp): Headers; /** * Converts a string, including ones with Unicode symbols, to Base64 encoding. * This function was adapted from the MDN example function here: * https://developer.mozilla.org/en-US/docs/Glossary/Base64#the_unicode_problem * @param {string} value The string value to encode * @returns {string} The Base64-encoded value */ static stringToBase64(value: string): string; } export interface IActorHttpFetchArgs extends IActorHttpArgs { /** * Maximum size of the cache (in bytes). * Defaults to 100MB. * @range {integer} * @default {104857600} */ cacheMaxSize: number; /** * Maximum number of documents to store in the cache. * @range {integer} * @default {1000} */ cacheMaxCount: number; /** * Maximum size of an entry in the cache (in bytes). * Defaults to 5MB. * @range {integer} * @default {5242880} */ cacheMaxEntrySize: number; /** * An actor that listens to HTTP invalidation events * @default { a } */ httpInvalidator: ActorHttpInvalidateListenable; /** * The agent options for the HTTP agent * @range {json} * @default {{ "keepAlive": true, "maxSockets": 5 }} */ agentOptions?: Record; }