UNPKG

@herlinus/coloquent

Version:

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

17 lines (16 loc) 779 B
import { HttpClient } from "../HttpClient"; import { AxiosInstance } from "axios"; import { HttpClientPromise } from "../HttpClientPromise"; export declare class AxiosHttpClient implements HttpClient { private axiosInstance; constructor(); setBaseUrl(baseUrl: string): void; 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(): AxiosInstance; }