Constructors
constructor
- new BaseClient(baseURL: string, config?: AxiosRequestConfig): BaseClient
-
Parameters
-
baseURL: string
-
Default value config: AxiosRequestConfig = {}
Properties
axios
axios: AxiosInstance
hostname
hostname: string
Methods
delete
- delete(path: string, options?: AxiosRequestConfig): Promise<any>
-
Parameters
-
path: string
-
Default value options: AxiosRequestConfig = {}
Returns Promise<any>
detail
-
Type parameters
Parameters
-
ResourceClass: T
-
id: string
-
Default value options: RequestConfig = {}
Returns Promise<ResourceResponse<InstanceType<T>, any>>
get
- get(path: string, options?: any): AxiosPromise<any>
-
Parameters
-
path: string
-
Default value options: any = {}
Returns AxiosPromise<any>
head
- head(path: string, options?: AxiosRequestConfig): Promise<any>
-
Parameters
-
path: string
-
Default value options: AxiosRequestConfig = {}
Returns Promise<any>
list
-
Type parameters
Parameters
negotiateContent
-
Type parameters
Parameters
onError
- onError(exception: Error | AxiosError): any
-
Parameters
-
exception: Error | AxiosError
Returns any
options
- options(path: string, options?: AxiosRequestConfig): any
-
Parameters
-
path: string
-
Default value options: AxiosRequestConfig = {}
Returns any
patch
- patch(path: string, body?: any, options?: AxiosRequestConfig): Promise<any>
-
Parameters
-
path: string
-
Default value body: any = {}
-
Default value options: AxiosRequestConfig = {}
Returns Promise<any>
post
- post(path: string, body?: any, options?: AxiosRequestConfig): Promise<any>
-
Parameters
-
path: string
-
Default value body: any = {}
-
Default value options: AxiosRequestConfig = {}
Returns Promise<any>
put
- put(path: string, body?: any, options?: AxiosRequestConfig): Promise<any>
-
Parameters
-
path: string
-
Default value body: any = {}
-
Default value options: AxiosRequestConfig = {}
Returns Promise<any>
Static extend
- extend<T, U>(this: U, classProps: T): U & T
-
Type parameters
Parameters
Returns U
&
T