import type { File } from '../file-system'; import type { ImageSource } from '../image-source'; import type { HttpResponse, HttpRequestOptions } from './http-interfaces'; export { request } from './http-request'; export * from './http-interfaces'; /** * Downloads the content from the specified URL as a string. * @param url The URL to request from. */ export function getString(url: string): Promise; /** * Downloads the content from the specified URL as a string. * @param options An object that specifies various request options. */ export function getString(options: HttpRequestOptions): Promise; /** * Downloads the content from the specified URL as a string and returns its JSON.parse representation. * @param url The URL to request from. */ export function getJSON(url: string): Promise; /** * Downloads the content from the specified URL as a string and returns its JSON.parse representation. * @param options An object that specifies various request options. */ export function getJSON(options: HttpRequestOptions): Promise; /** * Downloads the content from the specified URL and attempts to decode it as an image. * @param url The URL to request from. */ export function getImage(url: string): Promise; /** * Downloads the content from the specified URL and attempts to decode it as an image. * @param options An object that specifies various request options. */ export function getImage(options: HttpRequestOptions): Promise; /** * Downloads the content from the specified URL and attempts to save it as file. * @param url The URL to request from. * @param destinationFilePath Optional. The downloaded file path. */ export function getFile(url: string, destinationFilePath?: string): Promise; /** * Downloads the content from the specified URL and attempts to save it as file. * @param options An object that specifies various request options. * @param destinationFilePath Optional. The downloaded file path. */ export function getFile(options: HttpRequestOptions, destinationFilePath?: string): Promise; /** * Downloads the content from the specified URL as binary and returns an ArrayBuffer. * @param url The URL to request from. */ export function getBinary(url: string): Promise; /** * Downloads the content from the specified URL as binary and returns an ArrayBuffer. * @param options An object that specifies various request options. */ export function getBinary(options: HttpRequestOptions): Promise;