UNPKG

purai.js

Version:
11 lines (10 loc) 477 B
import { ApiRequest, ApiRequestMethod, ApiRequestOptions, ApiRequestPath } from '../types/api.js'; export declare class Http { key: string; baseUrl: string; constructor(key: string, baseUrl: string); check(response: Response): Promise<any>; request(method: ApiRequestMethod, path: ApiRequestPath, options?: ApiRequestOptions): Promise<Response>; get(path: ApiRequestPath): Promise<any>; post(path: ApiRequestPath, body: ApiRequest): Promise<any>; }