UNPKG

@api.global/typedrequest

Version:

A TypeScript library for making typed requests towards APIs, including facilities for handling requests, routing, and virtual stream handling.

24 lines (23 loc) 682 B
import * as plugins from './plugins.js'; import { TypedTarget } from './classes.typedtarget.js'; export declare class TypedRequest<T extends plugins.typedRequestInterfaces.ITypedRequest> { /** * in case we post against a url endpoint */ urlEndPoint?: string; /** * in case we post against a TypedTarget */ typedTarget: TypedTarget; method: string; /** * @param postEndPointArg * @param methodArg */ constructor(postTarget: string | TypedTarget, methodArg: T['method']); /** * fires the request */ fire(fireArg: T['request'], useCacheArg?: boolean): Promise<T['response']>; private postTrObject; }