///
import * as HTTP from 'http';
/** Subset of a WhatWG fetch response relevant for script loaders. */
export declare class FetchResponse {
url: string;
private data;
private getHeader;
constructor(url: string, data: string, getHeader: (name: string) => string | null | undefined);
text(): Promise;
ok: boolean;
headers: {
get: (name: string) => string | null | undefined;
};
}
/** Table of HTTP status codes redirecting the client to another URL. */
export declare const redirectCodes: {
[code: number]: boolean;
};
export interface NodeResponse {
text: string;
uri: string;
headers?: HTTP.IncomingHttpHeaders;
}
export declare function nodeRequest(uri: string, options?: HTTP.RequestOptions, ttl?: number): Promise;
/** Partial WhatWG fetch implementation for script loaders. */
export declare function fetch(uri: string, options?: {
method?: string;
}): Promise;