import { Path } from './path'; import { Method } from './method'; import { Parameters } from './parameters'; import { Options } from './options'; /** * URIContext is an interface used for expanding uri templates. */ export interface URIContext { [key: string]: string; } /** * RequestInfo holds details about a Request, except for the request body * itself. */ export interface RequestInfo { /** * path being requested. */ path: Path; /** * method of the request. */ method: Method; /** * params of the request. * * Valid only for read requests. */ params?: Parameters; /** * options for the Request */ options: Partial; } /** * Request represents an HTTP request. * * The URL part is separate from the Request information to * allow re-use among different endpoints. */ export interface Request extends RequestInfo { /** * body of the request. * * Valid only for write requests. */ body?: B; } /** * Head request. */ export declare class Head implements Request { path: Path; params: Parameters; options: Partial; method: Method; constructor(path: Path, params?: Parameters, options?: Partial); } /** * Get request. */ export declare class Get extends Head { method: Method; } /** * Post request. */ export declare class Post implements Request { path: Path; body?: B | undefined; options: Partial; method: Method; constructor(path: Path, body?: B | undefined, options?: Partial); } /** * Put request. */ export declare class Put extends Post { method: Method; } /** * Patch request. */ export declare class Patch extends Post { method: Method; } /** * Delete request. */ export declare class Delete extends Post { method: Method; }