import { Method } from "../utils/Method"; import { DynamicValue, Listener, Unsubscriber } from "./DynamicValue"; /** * A [[DynamicValue]] that updates with the return of an HTTP request * * @example * ```javascript * new HttpValue({ * name:"test", * method:"GET", * base:"https://jsonplaceholder.typicode.com/", * path:"todos", * interval:2000 * }) * ``` */ export declare class HttpValue implements DynamicValue { method: Method; url: string; base: string; path: string; name: string | void; interval: number; __variant__: string; /** * @param base A base part of the URL * @param path The path added after the base */ constructor({ name, method, base, path, interval }: { name?: string; method: Method; base: string; path: string; interval: number; }); onValue(listener: Listener): Unsubscriber; getValue(): Promise; static fromJSON(json: { name?: string; method: Method; base: string; path: string; interval: number; }): HttpValue; }