/** * The http client interface. */ import image_module = require("Image/image"); import promises = require("promises/promises"); export declare function getString(url: string): promises.Promise; export declare function getJSON(url: string): promises.Promise; export declare function getImage(url: string): promises.Promise; export declare function request(options: HttpRequestOptions): promises.Promise; export interface HttpRequestOptions { url: string; method: string; headers?: HttpHeader[]; body?: any; } export interface HttpHeader { name: string; value: string; } export interface HttpResponse { statusCode: number; headers: HttpHeader[]; body: HttpContent; } export interface HttpContent { toString: () => string; toJSON: () => any; toImage: () => image_module.Image; }