HttpClient
Class: HttpClient
Defined in: CodeBolt/packages/pluginSdk/src/core/httpClient.ts:15
Constructors
Constructor
new HttpClient(baseURL: string, timeout: number): HttpClient;
Defined in: CodeBolt/packages/pluginSdk/src/core/httpClient.ts:18
Parameters
| Parameter | Type | Default value |
|---|---|---|
baseURL | string | undefined |
timeout | number | 30000 |
Returns
HttpClient
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
axios | readonly | AxiosInstance | CodeBolt/packages/pluginSdk/src/core/httpClient.ts:16 |
Methods
delete()
delete<T>(url: string, config?: AxiosRequestConfig<any>): Promise<T>;
Defined in: CodeBolt/packages/pluginSdk/src/core/httpClient.ts:63
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
url | string |
config? | AxiosRequestConfig<any> |
Returns
Promise<T>
get()
get<T>(url: string, config?: AxiosRequestConfig<any>): Promise<T>;
Defined in: CodeBolt/packages/pluginSdk/src/core/httpClient.ts:43
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
url | string |
config? | AxiosRequestConfig<any> |
Returns
Promise<T>
patch()
patch<T>(
url: string,
data?: unknown,
config?: AxiosRequestConfig<any>): Promise<T>;
Defined in: CodeBolt/packages/pluginSdk/src/core/httpClient.ts:58
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
url | string |
data? | unknown |
config? | AxiosRequestConfig<any> |
Returns
Promise<T>
post()
post<T>(
url: string,
data?: unknown,
config?: AxiosRequestConfig<any>): Promise<T>;
Defined in: CodeBolt/packages/pluginSdk/src/core/httpClient.ts:48
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
url | string |
data? | unknown |
config? | AxiosRequestConfig<any> |
Returns
Promise<T>
put()
put<T>(
url: string,
data?: unknown,
config?: AxiosRequestConfig<any>): Promise<T>;
Defined in: CodeBolt/packages/pluginSdk/src/core/httpClient.ts:53
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
url | string |
data? | unknown |
config? | AxiosRequestConfig<any> |
Returns
Promise<T>