import { CancellablePromise } from './Task'; export declare type RequestMethod = 'delete' | 'DELETE' | 'get' | 'GET' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT'; export interface RequestOptions { data?: any; followRedirects?: boolean; handleAs?: 'text' | 'json'; headers?: { [key: string]: string | number; }; method?: RequestMethod; password?: string; query?: string | { [key: string]: any; }; proxy?: string; user?: string; username?: string; onDownloadProgress?: (progressEvent: any) => void; } export interface ProgressEvent { total: number; bytes: number; [index: string]: any; } export interface Headers { all: { [key: string]: string; }; get(key: string): string; } export interface Response { headers: Headers; ok: boolean; status: number; statusText: string; arrayBuffer(): CancellablePromise; json(): CancellablePromise; text(): CancellablePromise; } export default function request(url: string, options?: RequestOptions): CancellablePromise;