HttpClient
Class: HttpClient
Defined in: CodeBolt/packages/clientsdk/src/core/http-client.ts:4
Constructors
Constructor
new HttpClient(baseURL: string, timeout: number): HttpClient;
Defined in: CodeBolt/packages/clientsdk/src/core/http-client.ts:7
Parameters
| Parameter | Type | Default value |
|---|---|---|
baseURL | string | undefined |
timeout | number | 30000 |
Returns
HttpClient
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
axios | readonly | AxiosInstance | CodeBolt/packages/clientsdk/src/core/http-client.ts:5 |
Methods
delete()
delete<T>(url: string, config?: AxiosRequestConfig<any>): Promise<T>;
Defined in: CodeBolt/packages/clientsdk/src/core/http-client.ts:52
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/clientsdk/src/core/http-client.ts:32
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/clientsdk/src/core/http-client.ts:47
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/clientsdk/src/core/http-client.ts:37
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/clientsdk/src/core/http-client.ts:42
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
url | string |
data? | unknown |
config? | AxiosRequestConfig<any> |
Returns
Promise<T>