|
|
@ -41,6 +41,7 @@ export class HttpClient { |
|
|
|
|
|
|
|
|
|
|
|
constructor (baseUrl: string) { |
|
|
|
constructor (baseUrl: string) { |
|
|
|
this.baseUrl = baseUrl |
|
|
|
this.baseUrl = baseUrl |
|
|
|
|
|
|
|
this.syncBaseUrlWithStand() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async syncBaseUrlWithStand () { |
|
|
|
async syncBaseUrlWithStand () { |
|
|
@ -52,8 +53,6 @@ export class HttpClient { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
send (schema: SchemaInterface, data: any | null = null): Promise<AxiosResponse> { |
|
|
|
send (schema: SchemaInterface, data: any | null = null): Promise<AxiosResponse> { |
|
|
|
this.syncBaseUrlWithStand() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let url = schema.url |
|
|
|
let url = schema.url |
|
|
|
const preparedData = data |
|
|
|
const preparedData = data |
|
|
|
for (const key in data) { |
|
|
|
for (const key in data) { |
|
|
|