UNPKG

@herlinus/coloquent

Version:

Library for retrieving model objects from a JSON-API, with a fluent syntax inspired by Laravel Eloquent.

19 lines (18 loc) 789 B
import { HttpClientPromise } from "./HttpClientPromise"; export interface HttpClient { setBaseUrl(baseUrl: string): void; /** * `withCredentials` indicates whether or not cross-site Access-Control requests * should be made using credentials * * @param withCredientials */ setWithCredentials(withCredientials: boolean): void; get(url: string, config?: any): HttpClientPromise; delete(url: string, config?: any): HttpClientPromise; head(url: string, config?: any): HttpClientPromise; post(url: string, data?: any, config?: any): HttpClientPromise; put(url: string, data?: any, config?: any): HttpClientPromise; patch(url: string, data?: any, config?: any): HttpClientPromise; getImplementingClient(): any; }